Exemplo n.º 1
1
        public void Setup()
        {
            _game = new FiveByFiveGame();
            _player = new Player {IsHumanPlayer = false, Strikes = 0};

            _game.AddPlayer(_player);

            _ai = new EasyAi();
        }
Exemplo n.º 2
0
 public void CreateGameWithThisManyPlayers(int playercount)
 {
     Game = new FiveByFiveGame();
     switch (playercount)
     {
         case 1:
             Player p = new Player { IsHumanPlayer = true, Name = "Jeff" };
             Game.AddPlayer(p);
             break;
         case 2:
             Player q = new Player { IsHumanPlayer = true, Name = "Jeff" };
             Game.AddPlayer(q);
             Player r = new Player { IsHumanPlayer = true, Name = "Travis" };
             Game.AddPlayer(r);
             break;
         case 3:
             Player s = new Player { IsHumanPlayer = true, Name = "Jeff" };
             Game.AddPlayer(s);
             Player t = new Player { IsHumanPlayer = true, Name = "Travis" };
             Game.AddPlayer(t);
             Player u = new Player { IsHumanPlayer = true, Name = "Steve" };
             Game.AddPlayer(u);
             break;
     }
 }
Exemplo n.º 3
0
 public RollResult(Player p)
 {
     IsLastRoll = false;
 }
Exemplo n.º 4
0
 public void AddPlayer(Player p)
 {
     p.Position = Players.Count() + 1;
     Players.Add(p);
 }