Esempio n. 1
0
 /// <summary>
 /// Clone this board instance and apply a given player's information set to hide information they don't possess
 /// </summary>
 /// <param name="player">The player whose information set will be applied</param>
 /// <returns>A new board state from the point of view of the given player</returns>
 public BoardState CloneWithInformationSet(int player) => new BoardState
 {
     AvailableColonists = GamePhase == Phase.ColonistPick && PlayerTurn == player
         ? AvailableColonists
         : AvailableColonists.Select(_ => Colonist.Unknown).ToList(),
     Deck = Deck.Select(_ => Module.Unknown).ToList(),
     DiscardTempStorage = DiscardTempStorage,
     GamePhase          = GamePhase,
     PlayableColonists  = PlayableColonists,
     Players            = Players.Select(p => p.CloneWithInformationSet(player, this)).ToList(),
     PlayerTurn         = PlayerTurn,
     StartingDeck       = StartingDeck
 };