public void playgame() { Game.printGame(); while (true) { Console.WriteLine(P1.GetName() + "a turn "); P1.PickBall(Game); Game.printGame(); if (Game.isgameover()) { Console.WriteLine(P1.GetName() + "loses "); Console.WriteLine(P2.GetName() + " wins "); break; } Console.WriteLine(P2.GetName() + "a 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() + " a turn"); P1.PickBall(Game); Game.Printgame(); if (Game.Isgameover()) { Console.WriteLine(P1.GetName() + "Loses"); Console.WriteLine(P2.GetName() + "Win"); break; } Console.WriteLine(P2.GetName() + " a turn"); P2.PickBall(Game); Game.Printgame(); if (Game.Isgameover()) { Console.WriteLine(P1.GetName() + "Win"); Console.WriteLine(P2.GetName() + "Lose"); break; } } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + "a turn"); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + " Hung da thua"); Console.WriteLine(P2.GetName() + " Nhan da thang"); break; } Console.WriteLine(P2.GetName() + " a turn"); P2.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + " Nhan da thua "); Console.WriteLine(P1.GetName() + "Hung da thang "); break; } } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + "'a turn"); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + "loses"); Console.WriteLine(P1.GetName() + "wins"); break; } Console.WriteLine(P2.GetName() + "' a 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(); Console.WriteLine(P1.GetName() + " Play..."); P1.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(); Console.WriteLine("Player 1 : U LOSE =)) "); break; } Console.WriteLine(); Console.WriteLine(P2.GetName() + " Play..."); P2.PickBall(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(); Console.WriteLine("Player 2 : U LOSE =)) "); break; } } }
static void Main(string[] args) { P1 p1 = new P1(); P2 p2 = new P2(p1.u); double[,] m1 = { { 1, 4, 2, 3 }, { 2, 4, 0, 1 }, { 2, 5, 8, 2 }, { 2, 1, 1, 11 } }; double[,] m2 = { { 1, 0, 0, 0 }, { 0, 1, 0, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 1 } }; matp M1 = new matp(m1); M1.afis(); matp M2 = new matp(m2); M2.afis(); opr.mul(M1, M2).afis(); P3.mulStrass(M1, M2, 2).afis(); Console.WriteLine("\n\nDONE !"); Console.Read(); }
public void PlayGame() { Game.PrintGame(); while (true) { P1.PickBall(Game); Console.WriteLine(P1.GetName() + "plays..."); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("P1 Game Over"); break; } P2.PickBall(Game); Console.WriteLine(P2.GetName() + "plays..."); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine("P2 Game Over "); break; } } }
public void PlayGame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.GetName() + " Plays ...."); P1.Pickball(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P1.GetName() + " You Lose"); break; } Console.WriteLine(P2.GetName() + " Plays ...."); P2.Pickball(Game); Game.PrintGame(); if (Game.IsGameOver()) { Console.WriteLine(P2.GetName() + " You Lose"); break; } } }
public void Playgame() { Game.PrintGame(); while (true) { Console.WriteLine(P1.Getname() + " luot 1 "); P1.PickBall(Game); if (Game.Gameover()) { Console.WriteLine(P1.Getname() + "WIN"); Console.WriteLine(P2.Getname() + "LOSE"); break; } Console.WriteLine(P2.Getname() + " luot 1 "); P1.PickBall(Game); if (Game.Gameover()) { Console.WriteLine(P2.Getname() + "WIN"); Console.WriteLine(P1.Getname() + "LOSE"); break; } } }