Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private GameState _gameState;
private void StartNewGame()
{
var boardSize = (int)BoardSizeNumberBox.Value;
if (_gameState?.Size != boardSize)
{
_gameState = new GameState(boardSize);
PrepareGrid();
LayoutGameBoard();
}
_gameState.Randomize();
RedrawBoard();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment