public void GetPlayerNames() { Console.WriteLine("Player 1 choose a name:"); Console.ForegroundColor = ConsoleColor.Cyan; player1.GetPlayerName(); Console.ResetColor(); Console.WriteLine("Player 2 choose a name:"); Console.ForegroundColor = ConsoleColor.Green; player2.GetPlayerName(); Console.ResetColor(); }
static void Main(string[] args) { //Create the player object Player p1 = new Player(); p1.GetPlayerName(); p1.NeedRules(); //Create the Opponent object Opponent o1 = new Opponent(); //start the game Game game = new Game(); do { string playerDecision = p1.PlayerSelection(); string opponentDecision = o1.OpponentSelection(); Console.WriteLine("You chose {0}", playerDecision); Console.WriteLine("The Horde of Hamsters chose {0}", opponentDecision); game.WhoWins(playerDecision, opponentDecision); } while (game.PlayAgain()); }