public void PlayGame() { game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + " turn"); P1.PickBall(game); if (game.IsGameOver()) { Console.WriteLine(P1.GetName() + " loses "); Console.WriteLine(P2.GetName() + " wins "); break; } game.PrintGame(); Console.WriteLine(P2.GetName() + "turn"); P2.PickBall(game); if (game.IsGameOver()) { Console.WriteLine(P1.GetName() + " wins "); Console.WriteLine(P2.GetName() + " loses "); break; } game.PrintGame(); } }
//play public void PlayGame() { Game.PrintGame(); while (true) { Console.Write(P1.GetName() + "turn "); P1.PickBalls(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + "loses"); Console.WriteLine(P2.GetName() + "Wins"); break; } Console.Write(P1.GetName() + "turn "); P2.PickBalls(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + " Loses"); Console.WriteLine(P1.GetName() + " Wins"); break; } } }
public void PlayGame() { Game.Printgame(); while (true) { Console.WriteLine(P1.GetName() + "'s turn"); P1.Pickball(Game); Game.Printgame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + "\t" + "LOSES!"); Console.WriteLine(P2.GetName() + "\t" + "WINS!"); break; } Console.WriteLine(P2.GetName() + "'s turn"); P2.Pickball(Game); Game.Printgame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + "LOSES!"); Console.WriteLine(P1.GetName() + "WINS!"); break; } } }
public void PlayGame() { Game.Printgame(); while (true) { Console.WriteLine(P1.GetName() + " play: "); P1.PickBalls(Game); Game.Printgame(); if (Game.IsgameOver()) { Console.WriteLine(P2.GetName() + " play: "); break; } Console.WriteLine("Player2 pickBall: "); P2.PickBalls(Game); Game.Printgame(); if (Game.IsgameOver()) { Console.WriteLine("Player2 lose!"); break; } } }
public void playGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + "Play"); P1.PickBall(Game); if (Game.IsGameOVer()) { Console.WriteLine(P1.GetName() + "lose"); Console.WriteLine(P2.GetName() + " win"); break; } Game.PrintGame(); Console.WriteLine(P2.GetName() + " play"); P2.PickBall(Game); if (Game.IsGameOVer()) { Console.WriteLine(P2.GetName() + "lose"); Console.WriteLine(P1.GetName() + " win"); break; } Game.PrintGame(); } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + "'s turn"); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + " is lost !"); Console.WriteLine(P2.GetName() + " is a champion !"); break; } Console.WriteLine(P2.GetName() + "'s turn"); P2.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + " is lost !"); Console.WriteLine(P1.GetName() + " is a champion !"); break; } } }
public void PlayGames() { while (game.isGameOver() != true) { game.PrintGame(); P1.pickball(game); if (game.isGameOver()) { Console.WriteLine(P1.GetName() + "Loses"); Console.WriteLine(P2.GetName() + "Wins"); break; } Console.WriteLine(P2.GetName() + "a turn"); game.PrintGame(); P2.pickball(game); } }
public void PlayGame() { while (true) { Game.PrintGame(); P1.PickBall(Game); if (Game.IsGameOver()) { Console.WriteLine("{0} loses AND {1} wins", P1.GetName(), P2.GetName()); break; } Game.PrintGame(); P2.PickBall(Game); if (Game.IsGameOver()) { Console.WriteLine("{0} loses AND {1} wins", P2.GetName(), P1.GetName()); break; } } }
public void PlayGame() { game.PrintGame(); while (true) { Console.WriteLine("{0} plays...", P1.GetName()); P1.PlayGame(game); game.PrintGame(); if (game.isGameOver()) { Console.WriteLine(P1.GetName() + " win"); break; } Console.WriteLine("{0} plays...", P2.GetName()); P2.PlayGame(game); game.PrintGame(); if (game.isGameOver()) { Console.WriteLine(P2.GetName() + " win"); break; } } }
public void Playgame() { Game.PrintGame(); while (true) { Console.WriteLine("{0} plays...", P1.GetName()); P1.PickBalls(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + " win"); break; } Console.WriteLine("{0} plays...", P2.GetName()); P2.PickBalls(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + " win"); break; } } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + " play"); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("P1 game over"); break; } Console.WriteLine(P2.GetName() + " play"); P2.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("P2 game over"); break; } } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + " Player 1 : "); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("Player 1 : You Lose"); break; } Console.WriteLine(P2.GetName() + " Player 2 : "); P2.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("Player 2 : You Lose"); break; } } }