Exemple #1
0
        public Player(GameState g, LocationPlayer l)
        {
            gameState = g;
            side = l;

            hand = new Pile(new Location(LocationPile.HAND, l));
            graveyard = new Pile(new Location(LocationPile.GRAVEYARD, l));
            exile = new Pile(new Location(LocationPile.EXILE, l));
            field = new Pile(new Location(LocationPile.FIELD, l));
            deck = new Pile(new Location(LocationPile.DECK, l));

            piles = new Pile[5];
            piles[(int)LocationPile.DECK] = deck;
            piles[(int)LocationPile.EXILE] = exile;
            piles[(int)LocationPile.FIELD] = field;
            piles[(int)LocationPile.GRAVEYARD] = graveyard;
            piles[(int)LocationPile.HAND] = hand;

            curMana = new int[5];
            maxMana = new int[5];
            bonusMana = new int[5];

            health = 20;
        }
Exemple #2
0
 public Player getPlayerById(LocationPlayer side)
 {
     if (side == LocationPlayer.HERO) return game.hero;
     else if (side == LocationPlayer.VILLAIN) return game.villain;
     throw new Exception();
 }