Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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