Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();
        }
Пример #2
0
        private void NewGameButton_Click(object sender, EventArgs e)
        {
            game.NewGame();

            // Redraw the grid
            Invalidate();
        }
Пример #3
0
        private void StartNewGame()
        {
            game.NewGame();

            // Redraw the grid
            Invalidate();
        }
Пример #4
0
 private void newGameButton_Click(object sender, EventArgs e)
 {
     // Fill grid with either white or black
     _game.NewGame();
     // Redraw grid
     this.Invalidate();
 }
Пример #5
0
        private void newGameButton_Click(object sender, System.EventArgs e)
        {
            game.NewGame();

            // Redraw grid
            this.Invalidate();
        }
Пример #6
0
        private void StartNewGame()
        {
            game.NewGame();

            // Redraw grid
            this.Invalidate();
        }
Пример #7
0
        private AboutForm aboutBox;             // About dialog box

        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();

            // Default to 3x3 grid
            x3ToolStripMenuItem.Checked = true;
        }
Пример #8
0
        private void newGameButton_Click(object sender, EventArgs e)
        {
            game.NewGame();

            //for (int r = 0; r < NumCells; r++)
            //    for (int c = 0; c < NumCells; c++)
            //        grid[r, c] = rand.Next(2) == 1;

            this.Invalidate();
        }
Пример #9
0
 private void newGameButton_Click(object sender, EventArgs e)
 {
     lightsOutGame.NewGame();
     // Fill grid with either white or black
     for (int r = 0; r < NumCells; r++)
     {
         for (int c = 0; c < NumCells; c++)
         {
             grid[r, c] = lightsOutGame.GetGridValue(r, c);
         }
     }
     // Redraw grid
     this.Invalidate();
 }
Пример #10
0
        //private bool[,] grid;
        //private Random rand;

        public MainForm()
        {
            InitializeComponent();

            game = new LightsOutGame();
            game.NewGame();

            //rand = new Random();
            //grid = new bool[NumCells, NumCells];

            //for (int r = 0; r < NumCells; r++)
            //    for (int c = 0; c < NumCells; c++)
            //        grid[r, c] = true;
        }
Пример #11
0
 private void NewGameButton_Click(object sender, EventArgs e)
 {
     game.NewGame();
     this.Invalidate();
 }
Пример #12
0
 private void StartNewGame()
 {
     game.NewGame();
     Invalidate();
 }
Пример #13
0
 private void NewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     lightsOut.NewGame();
     this.Invalidate();
 }
Пример #14
0
 public MainForm()
 {
     CellLength = GridLength / game.GridSize;
     InitializeComponent();
     game.NewGame();
 }
Пример #15
0
 private void MenuNew_Click(object sender, RoutedEventArgs e)
 {
     game.NewGame();
     DrawGrid();
 }