Exemple #1
0
        private void gameFieldPictureBox_Paint(object sender, PaintEventArgs e)
        {
            game.Draw(e.Graphics);

            if (game.IsCellInGameField(illumination.X, illumination.Y) &&
                game.Cells[illumination.X, illumination.Y].CellState == CellState.Closed)
            {
                e.Graphics.FillRectangle(Brushes.Gray, illumination.X * Game.CellSize,
                                         illumination.Y * Game.CellSize, Game.CellSize, Game.CellSize);
            }
        }