//Constructor public TwoPlayerGame() { Console.WriteLine("\r\n" + "This is A Two Player Game."); Console.WriteLine("\r\n" + "Player One, Please Enter Your Name:"); playerOneName = Console.ReadLine(); Console.WriteLine("\r\n" + "Player Two, Please Enter Your Name:"); playerTwoName = Console.ReadLine(); PlayerOne playerOne = new PlayerOne(playerOneName); PlayerTwo playerTwo = new PlayerTwo(playerTwoName); ScoreBoardMulti scoreBoard = new ScoreBoardMulti(); scoreBoard.DisplayScore(playerOne.name, playerTwo.name); Console.WriteLine("\r\n" + "The Scores Are Set To 0. Let's Begin!"); do { Console.WriteLine("\r\n" + playerOne.name + ", It's Your Move"); playerOneMove = playerOne.MakeMove(); Console.Clear(); Console.WriteLine("\r\n" + playerTwo.name + ", It's Your Move"); playerTwoMove = playerTwo.MakeMove(); Console.Clear(); scoreBoard.ShowMoves(playerOneMove, playerTwoMove, playerOne.name, playerTwo.name); scoreBoard.DecideRound(playerOneMove, playerTwoMove); scoreBoard.DisplayScore(playerOne.name, playerTwo.name); Console.ReadLine(); }while (scoreBoard.playerOneScore < 2 && scoreBoard.playerTwoScore < 2); }
//Constructor public OnePlayerGame() { Console.WriteLine("\r\n" + "This is A One Player Game."); Console.WriteLine("\r\n" + "Please Enter Your Name:"); playerName = Console.ReadLine(); PlayerOne playerOne = new PlayerOne(playerName); Computer computer = new Computer(); ScoreBoardSingle scoreBoard = new ScoreBoardSingle(); Console.WriteLine("\r\n" + "Hello, " + playerOne.name + "!"); scoreBoard.DisplayScore(playerOne.name); Console.WriteLine("\r\n" + "The Scores Are Set To 0. Let's Begin!"); do { playerMove = playerOne.MakeMove(); computerMove = computer.MakeMove(); computer.ShowMove(computerMove); scoreBoard.DecideRound(playerMove, computerMove); scoreBoard.DisplayScore(playerOne.name); Console.ReadLine(); }while (scoreBoard.playerScore < 2 && scoreBoard.computerScore < 2); }