Last active
December 13, 2020 12:54
-
-
Save MartinZikmund/bfd9f870c0982cb2d953f2357124c93a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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