Skip to content

Instantly share code, notes, and snippets.

@MartinZikmund
Created December 13, 2020 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinZikmund/bace160507ae55afe2ef72608029f69e to your computer and use it in GitHub Desktop.
Save MartinZikmund/bace160507ae55afe2ef72608029f69e to your computer and use it in GitHub Desktop.
private readonly Random _random = new Random();
public void Randomize()
{
for (int row = 0; row < Size; row++)
{
for (int column = 0; column < Size; column++)
{
Cells[row, column] = (CellState)_random.Next(0, 2);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment