Beispiel #1
0
 public GameConfigBuilder()
 {
     this.useShelters          = false;
     this.useColonyAndPlatinum = false;
     this.kingdomPiles         = null;
     this.startingDeck         = GetDefaultStartingDeck;
     this.shuffleLuck          = GetDefaultStartingHand;
 }
Beispiel #2
0
 public GameConfigBuilder(GameConfig gameConfig)
 {
     this.useShelters          = gameConfig.useShelters;
     this.useColonyAndPlatinum = gameConfig.useColonyAndPlatinum;
     this.kingdomPiles         = gameConfig.kingdomPiles;
     this.startingDeck         = gameConfig.startingDeck;
     this.shuffleLuck          = gameConfig.startingHand;
 }
 public GameConfigBuilder()
 {
     this.useShelters = false;
     this.useColonyAndPlatinum = false;
     this.kingdomPiles = new List<Card>();
     this.events = new List<Card>();
     this.startingDeck = GetDefaultStartingDeck;
     this.shuffleLuck = GetDefaultStartingHand;
 }
 public GameConfigBuilder(GameConfig gameConfig)
 {
     this.useShelters = gameConfig.useShelters;
     this.useColonyAndPlatinum = gameConfig.useColonyAndPlatinum;
     this.baneCard = gameConfig.baneCard;
     this.kingdomPiles = new List<Card>(gameConfig.kingdomPiles);
     this.events = new List<Card>(gameConfig.gameDescription.events);
     this.startingDeck = gameConfig.startingDeck;
     this.shuffleLuck = gameConfig.startingHand;
 }
 public GameConfigBuilder()
 {
     this.useShelters          = false;
     this.useColonyAndPlatinum = false;
     this.kingdomPiles         = new List <Card>();
     this.events       = new List <Event>();
     this.landmarks    = new List <Landmark>();
     this.projects     = new List <Project>();
     this.startingDeck = GetDefaultStartingDeck;
     this.shuffleLuck  = GetDefaultStartingHand;
 }
 public GameConfigBuilder(GameConfig gameConfig)
 {
     this.useShelters          = gameConfig.useShelters;
     this.useColonyAndPlatinum = gameConfig.useColonyAndPlatinum;
     this.baneCard             = gameConfig.baneCard;
     this.kingdomPiles         = new List <Card>(gameConfig.kingdomPiles);
     this.events       = new List <Event>(gameConfig.gameDescription.events);
     this.landmarks    = new List <Landmark>(gameConfig.gameDescription.landmarks);
     this.projects     = new List <Project>(gameConfig.gameDescription.projects);
     this.startingDeck = gameConfig.startingDeck;
     this.shuffleLuck  = gameConfig.startingHand;
 }
        public GameConfig(            
            GameDescription gameDescription,
            MapPlayerGameConfigToCardSet startingDecks = null,
            MapPlayerGameConfigToCardSet startingHands = null)
        {
            this.gameDescription = gameDescription;
            this.startingDeck = startingDecks;
            this.startingHand = startingHands;

            this.cardGameSubset = new CardGameSubset();
            var availabilities = GetCardAvailability(1, CardAvailabilityType.AllPossibleCardsInGame);
            foreach(var availability in availabilities)
                this.cardGameSubset.AddCard(availability.card);
        }
Beispiel #8
0
        public GameConfig(
            GameDescription gameDescription,
            MapPlayerGameConfigToCardSet startingDecks = null,
            MapPlayerGameConfigToCardSet startingHands = null)
        {
            this.gameDescription = gameDescription;
            this.startingDeck    = startingDecks;
            this.startingHand    = startingHands;


            this.cardGameSubset = new CardGameSubset();
            var availabilities = GetCardAvailability(1, CardAvailabilityType.AllPossibleCardsInGame);

            foreach (var availability in availabilities)
            {
                this.cardGameSubset.AddCard(availability.card);
            }
        }
Beispiel #9
0
        public GameConfig(
            Card[] supplyPiles,
            bool useShelters,
            bool useColonyAndPlatinum,
            MapPlayerGameConfigToCardSet startingDecks = null,
            MapPlayerGameConfigToCardSet startingHands = null)
        {
            this.useShelters          = useShelters;
            this.useColonyAndPlatinum = useColonyAndPlatinum;
            this.kingdomPiles         = supplyPiles;
            this.startingDeck         = startingDecks;
            this.startingHand         = startingHands;
            this.cardGameSubset       = new CardGameSubset();

            GetSupplyPiles(1, null, this.cardGameSubset);
            GetNonSupplyPiles(this.cardGameSubset);

            this.cardGameSubset.isInitializing = false;
        }
Beispiel #10
0
        public GameConfig(
            Card[] supplyPiles,
            bool useShelters,
            bool useColonyAndPlatinum,
            MapPlayerGameConfigToCardSet startingDecks = null,
            MapPlayerGameConfigToCardSet startingHands = null)
        {
            this.useShelters = useShelters;
            this.useColonyAndPlatinum = useColonyAndPlatinum;
            this.kingdomPiles = supplyPiles;
            this.startingDeck = startingDecks;
            this.startingHand = startingHands;
            this.cardGameSubset = new CardGameSubset();

            GetSupplyPiles(1, null, this.cardGameSubset);
            GetNonSupplyPiles(this.cardGameSubset);

            this.cardGameSubset.isInitializing = false;
        }
Beispiel #11
0
        public GameConfig(
            Card[] kingdomPiles,
            Card baneCard,
            bool useShelters,
            bool useColonyAndPlatinum,
            MapPlayerGameConfigToCardSet startingDecks = null,
            MapPlayerGameConfigToCardSet startingHands = null)
        {
            this.useShelters          = useShelters;
            this.useColonyAndPlatinum = useColonyAndPlatinum;
            this.kingdomPiles         = kingdomPiles;
            this.startingDeck         = startingDecks;
            this.startingHand         = startingHands;
            this.baneCard             = baneCard;

            this.cardGameSubset = new CardGameSubset();
            var availabilities = GetCardAvailability(1, CardAvailabilityType.AllPossibleCardsInGame);

            foreach (var availability in availabilities)
            {
                this.cardGameSubset.AddCard(availability.card);
            }
        }
 public void SetShuffleLuckPerPlayer(IEnumerable<CardCountPair>[] cardPerPlayer)
 {
     this.shuffleLuck = GetCardSetFromArray(cardPerPlayer);
 }
Beispiel #13
0
 private void SwapPlayerOneAndTwo()
 {
     this.startingDeck = SwapPlayersInSet(this.startingDeck);
     this.startingHand = SwapPlayersInSet(this.startingHand);
 }
Beispiel #14
0
 static MapPlayerGameConfigToCardSet SwapPlayersInSet(MapPlayerGameConfigToCardSet original)
 {
     return delegate(int playerIndex, GameConfig gameConfig)
     {
         if (playerIndex == 0)
         {
             return original(1, gameConfig);
         }
         else if (playerIndex == 1)
         {
             return original(0, gameConfig);
         }
         else
             throw new Exception("Only expected 2 players");
     };
 }
Beispiel #15
0
 public void SetStartingDeckPerPlayer(IEnumerable<CardCountPair>[] cardPerPlayer)
 {
     this.startingDeck = GetCardSetFromArray(cardPerPlayer);
 }
Beispiel #16
0
 public void SetStartingDeck(IEnumerable<CardCountPair> startingCards)
 {
     this.startingDeck = GetCardSetSameForAllPlayers(startingCards);
 }
 public void SetCardSplitPerPlayer(StartingCardSplit[] splits)
 {
     this.shuffleLuck = GetStartingHandForSplit(splits);
 }
Beispiel #18
0
 public void SetShuffleLuckPerPlayer(IEnumerable <CardCountPair>[] cardPerPlayer)
 {
     this.shuffleLuck = GetCardSetFromArray(cardPerPlayer);
 }
Beispiel #19
0
 public void SetStartingDeck(IEnumerable <CardCountPair> startingCards)
 {
     this.startingDeck = GetCardSetSameForAllPlayers(startingCards);
 }
Beispiel #20
0
 public void SetStartingDeckPerPlayer(IEnumerable <CardCountPair>[] cardPerPlayer)
 {
     this.startingDeck = GetCardSetFromArray(cardPerPlayer);
 }
Beispiel #21
0
 public GameConfigBuilder()
 {
     this.useShelters = false;
     this.useColonyAndPlatinum = false;
     this.kingdomPiles = null;
     this.startingDeck = GetDefaultStartingDeck;
     this.startingHand = GetDefaultStartingHand;
 }
Beispiel #22
0
 public void SetCardSplitPerPlayer(StartingCardSplit[] splits)
 {
     this.shuffleLuck = GetStartingHandForSplit(splits);
 }
Beispiel #23
0
 public GameConfigBuilder(GameConfig gameConfig)
 {
     this.useShelters = gameConfig.useShelters;
     this.useColonyAndPlatinum = gameConfig.useColonyAndPlatinum;
     this.kingdomPiles = gameConfig.kingdomPiles;
     this.startingDeck = gameConfig.startingDeck;
     this.startingHand = gameConfig.startingHand;
 }