示例#1
0
        private void btnGameStart_Click(object sender, EventArgs e)
        {
            game = new NIM_Game();
            game.GameReset();
            if (settings.CustomGame.Count() == 0)
            {
                game.GameStart(settings.RowNumb);
                game.CreateGameWithRandomRows(settings.RowMinHeight, settings.RowMaxHeight);
            }
            else
            {
                game.GameStartCustom(settings.CustomGame);
            }
            Game FormGame = new Game(game, settings);

            FormGame.ShowDialog();
        }
示例#2
0
 private void btnRestart_Click(object sender, EventArgs e)
 {
     //PlayerWin(false);
     PlayerWon = false;
     ClearScreen();
     if (settings.CustomGame.Count == 0)
     {
         game.GameReset();
         game.GameStart(settings.RowNumb);
         game.CreateGameWithRandomRows(settings.RowMinHeight, settings.RowMaxHeight);
     }
     else
     {
         game.GameReset();
         game.GameStartCustom(settings.CustomGame);
     }
     Steps = 1;
     ClearConsole();
     RefreshScreen();
 }