Exemple #1
0
 static void Main(string[] args)
 {
     string answer = "y";
     Console.Write("Hello! Please input your name: ");
     string name = Console.ReadLine();
     Player player = new Player(name);
     AI ai = new AI("Toster");
     while (answer.Equals("y"))
     {
         Game game = new Game(player, ai);
         game.start();
         Console.WriteLine();
         Console.WriteLine("You want to play still?(y/n)");
         answer = Console.ReadLine();
         Console.Clear();
     }
 }
Exemple #2
0
 public Game(Player player, AI ai)
 {
     this.player = player;
     this.ai = ai;
 }