Skip to content

Commit

Permalink
getting randomization to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
strassek committed Jul 25, 2011
1 parent b333c85 commit b7abfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game_of_life/mpi/Life.c
Expand Up @@ -385,7 +385,7 @@ void randomize_grid (struct life_t * life, double prob)

for (i = 1; i <= nrows; i++) {
for (j = 1; j <= tcols; j++) {
if (rand_double() < prob && j <= ubound+1 && j >= lbound)
if (rand_double() < prob && j <= ubound+1 && j > lbound)
life->grid[i][j % (ncols+1)] = ALIVE;
}
}
Expand Down

0 comments on commit b7abfec

Please sign in to comment.