示例#1
0
        CardType BuyCard(PlayerDeck deck)
        {
            if (deck.AmountOfCardsBought % PlayerDeck.DeckSize == 0)
            {
                deck.Shuffle();
            }

            return(deck.BuyCard());
        }
示例#2
0
        void Start()
        {
            var gameObjectFactory = new GameObjectFactory(cardPrefabMap, playerPrefab);
            var deployer          = new Deployer(gameObjectFactory, arena, gameplayHUD);
            var gameActionFactory = new GameActionFactory(deployer);

            gameplayHUD.Setup(gestureRecognizer, arena);
            gameplayHUD.CreateCardSlots(PlayerHand.HandSize);

            HomePlayer    = gameObjectFactory.CreatePlayer(Team.Home);
            VisitorPlayer = gameObjectFactory.CreatePlayer(Team.Visitor);

            HomePlayer.Setup(PlayerDeck.GetDummyDeck());
            VisitorPlayer.Setup(PlayerDeck.GetDummyDeck());

            Dealer.DealInitialCards(HomePlayer);
            Dealer.DealInitialCards(VisitorPlayer);

            matchReferee.Setup(gameActionFactory, players: new [] { HomePlayer, VisitorPlayer });
        }
示例#3
0
 public void Setup(PlayerDeck deck)
 {
     Deck = deck;
 }