mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Cleanup: rename random_init() to random_new(), because it actually
_allocates_ a random_state rather than just initialising one passed in by the caller. [originally from svn r6412]
This commit is contained in:
12
blackbox.c
12
blackbox.c
@ -692,9 +692,9 @@ static int check_guesses(game_state *state, int cagey)
|
||||
* grid, so that repeating the same marking will give
|
||||
* the same answer instead of a different one.
|
||||
*/
|
||||
random_state *rs = random_init((char *)guesses->grid,
|
||||
(state->w+2)*(state->h+2) *
|
||||
sizeof(unsigned int));
|
||||
random_state *rs = random_new((char *)guesses->grid,
|
||||
(state->w+2)*(state->h+2) *
|
||||
sizeof(unsigned int));
|
||||
n = random_upto(rs, n);
|
||||
random_free(rs);
|
||||
for (i = 0; i < guesses->nlasers; i++) {
|
||||
@ -727,9 +727,9 @@ static int check_guesses(game_state *state, int cagey)
|
||||
* grid, so that repeating the same marking will give
|
||||
* the same answer instead of a different one.
|
||||
*/
|
||||
random_state *rs = random_init((char *)guesses->grid,
|
||||
(state->w+2)*(state->h+2) *
|
||||
sizeof(unsigned int));
|
||||
random_state *rs = random_new((char *)guesses->grid,
|
||||
(state->w+2)*(state->h+2) *
|
||||
sizeof(unsigned int));
|
||||
n = random_upto(rs, n);
|
||||
random_free(rs);
|
||||
for (i = 0; i < guesses->nlasers; i++) {
|
||||
|
Reference in New Issue
Block a user