Exemple #1
0
 public Game()
 {
     SimplePlayerFactory  = SimplePlayerFactory.Instance;
     ActivePlayer         = SimplePlayerFactory.CreatePlayer(PLAYER_NAMES[0], PlayerType.Human);
     InactivePlayer       = null;
     NumberOfHumanPlayers = NumberOfHumanPlayers.OnePlayer;
 }
Exemple #2
0
 private void CreateOtherPlayer()
 {
     if (NumberOfHumanPlayers == NumberOfHumanPlayers.OnePlayer)
     {
         InactivePlayer = SimplePlayerFactory.CreatePlayer(PLAYER_NAMES[1], PlayerType.Computer);
     }
     else
     {
         InactivePlayer = SimplePlayerFactory.CreatePlayer(PLAYER_NAMES[1], PlayerType.Human);
     }
     ActivePlayer.Opponent   = InactivePlayer;
     InactivePlayer.Opponent = ActivePlayer;
 }