public Game() { SimplePlayerFactory = SimplePlayerFactory.Instance; ActivePlayer = SimplePlayerFactory.CreatePlayer(PLAYER_NAMES[0], PlayerType.Human); InactivePlayer = null; NumberOfHumanPlayers = NumberOfHumanPlayers.OnePlayer; }
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; }