Beispiel #1
0
    /* プレイヤーの基本動作 */
    public void drawCards(AllDecks deck, int num = 2)
    {
        for (int i = 0; i < num; i++)
        {
            hands.Add(deck.getStrategyDeck().First.Value);
            deck.getStrategyDeck().RemoveFirst();
        }

        GameObserver.Instance.setHandsSprite(this, num);
    }
Beispiel #2
0
    /* プレイヤーへの初期エージェント・手札の配布 */
    public Player firstDealforPlayer(AllDecks decks, Agent choosedAgent)
    {
        Side side;
        List <StrategyCard> hands = new List <StrategyCard>();

        side = decks.getSideDeck().First.Value;
        decks.getSideDeck().RemoveFirst();

        for (int i = 0; i < 3; i++)
        {
            hands.Add(decks.getStrategyDeck().First.Value);
            decks.getStrategyDeck().RemoveFirst();
        }

        return(new Player(true, side, choosedAgent, hands));
    }
Beispiel #3
0
    /* CPUへの初期エージェント・手札の配布 */
    public List <Player> firstDealforCPU(AllDecks decks, int numCPUs)
    {
        List <Player>       cPUs = new List <Player>();
        List <StrategyCard> hands;

        for (int i = 0; i < numCPUs; i++)
        {
            hands = new List <StrategyCard>();
            for (int j = 0; j < 3; j++)
            {
                hands.Add(decks.getStrategyDeck().First.Value);
                decks.getStrategyDeck().RemoveFirst();
            }
            cPUs.Add(new Player(false, decks.getSideDeck().First.Value, decks.getAgentDeck().First.Value, hands));
            decks.getSideDeck().RemoveFirst();
            decks.getAgentDeck().RemoveFirst();
        }
        return(cPUs);
    }