public void CreateNewGame() { string firstPlayerName, secondPlayerName; int boardSize; int opponentChoice; CheckersGame newGame = new CheckersGame(); this.printWelcomeMsg(); firstPlayerName = this.getPlayerName(); newGame.AddNewPlayer(firstPlayerName, Square.eSquareType.playerOne); boardSize = this.getBoardSizeFromUser(); opponentChoice = this.getOpponnetOptions(); if (opponentChoice == int.Parse(k_AgainstAnothePlayerChar)) { secondPlayerName = this.getPlayerName(); newGame.AddNewPlayer(secondPlayerName, Square.eSquareType.playerTwo); } else { secondPlayerName = k_ComputerNameString; newGame.AddNewPlayer(string.Empty, Square.eSquareType.playerPC); } newGame.CreateGameBoard(boardSize); this.runGame(newGame, boardSize); }
private void endOfRoundScreen(CheckersGame i_Game, Square.eSquareType i_PlayerType, bool i_WinningPlayer, ref CheckersGame.eRoundOptions io_CurrentRound, ref string io_PreviousMove) { this.clearScreen(); this.printEndGame(i_Game, i_PlayerType, i_WinningPlayer); if (!this.playerWantsAnotherRound(i_Game, i_PlayerType)) { Console.WriteLine("Goodbye! :)"); io_CurrentRound = CheckersGame.eRoundOptions.gameOver; } else { // player wants to play another game i_Game.CreateGameBoard(i_Game.Board.Size); io_PreviousMove = string.Empty; } }