Last active
December 13, 2020 13:14
-
-
Save MartinZikmund/488d6ee30bb117f742f53de7f0001c56 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 BitmapImage _aliveBitmap = new BitmapImage(new Uri($"ms-appx:///Assets/Classic_alive.png")); | |
private BitmapImage _deadBitmap = new BitmapImage(new Uri($"ms-appx:///Assets/Classic_dead.png")); | |
private void RedrawBoard() | |
{ | |
for (var row = 0; row < _gameState.Size; row++) | |
{ | |
for (var column = 0; column < _gameState.Size; column++) | |
{ | |
var cell = GetCell(row, column); | |
cell.Source = _gameState.Cells[row, column] == CellState.Alive ? | |
_aliveBitmap : _deadBitmap; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment