示例#1
0
 public GameStateTracker InitializeGame()
 {
     GameState             = new GameStateTracker();
     GameState.HumanPlayer = new Player("Player");
     GameState.AIPlayer    = new AIPlayer("Opponent");
     GameState.AppendToGameLog("Welcome to Tides of Madness!");
     GameState.Deck        = DeckGenerator.GenerateDeck();
     GameState.DiscardPile = new CardCollection();
     GameState.Deck.Shuffle();
     GameState.CurrentRound     = 1;
     GameState.CurrentGameState = GameStates.Setup;
     SuitOptions = ListOptionGenerator.GenerateSuitOptions();
     SetUpRound();
     RefreshStatesAndInputStatus();
     return(GameState);
 }
示例#2
0
 private void ResolveMadnessBothPlayers(Player humanPlayer, AIPlayer aiPlayer)
 {
     ResolveMadnessOnePlayer(humanPlayer);
     ResolveMadnessOnePlayer(aiPlayer);
     if (humanPlayer.MadnessThisRound > aiPlayer.MadnessThisRound)
     {
         GameState.PlayerWithMostMadnessThisRound = humanPlayer;
         GameState.AppendToGameLog($"{humanPlayer.Name} had the highest Madness total this round, and gets to select a bonus.");
         MadnessOptions = ListOptionGenerator.GenerateMadnessListOptions(GameState.HumanPlayer); //There is DEFINITELY a better way and place for this
     }
     else if (aiPlayer.MadnessThisRound > humanPlayer.MadnessThisRound)
     {
         GameState.PlayerWithMostMadnessThisRound = aiPlayer;
         GameState.AppendToGameLog($"{aiPlayer.Name} had the highest Madness total this round, and gets to select a bonus.");
     }
     else
     {
         GameState.PlayerWithMostMadnessThisRound = null;
         GameState.AppendToGameLog("Both players had the same Madness total.");
     }
 }