Beispiel #1
0
        public BoardState(PlayerSetup givenP1, Deck p1Deck1, PlayerSetup givenP2, Deck p2Deck, int startCards)
        {
            Random random       = new Random();
            int    randomNumber = random.Next(0, 1000);

            playerGoingFirst = randomNumber / 500;
            p1 = new PlayerBoardState(givenP1, playerGoingFirst == 0, p1Deck1, this, playerNr.Player1, startCards);
            p2 = new PlayerBoardState(givenP2, playerGoingFirst == 1, p2Deck, this, playerNr.Player2, startCards);
            p1.SetOpponent(p2);
            p2.SetOpponent(p1);
            statisticResult = new MatchResult();
        }
Beispiel #2
0
 /// <summary>
 /// Used for creating the original player
 /// </summary>
 /// <param name="playerSetup"></param>
 /// <param name="isGoingFirst"></param>
 /// <param name="deck"></param>
 /// <param name="board"></param>
 /// <param name="playerNr"></param>
 public PlayerBoardState(PlayerSetup playerSetup, bool isGoingFirst, Deck deck, BoardState board, playerNr playerNr, int StartCards)
 {
     startCards       = StartCards;
     this.playerNr    = playerNr;
     Hero             = new Hero(board, this);
     this.board       = board;
     this.playerSetup = playerSetup;
     myDeck           = deck.GetCardList(board, this);
     templateDeck     = deck;
     myHand           = new List <ICard>();
     myBoard          = new List <ICard>();
     myBoardWithTaunt = new List <ICard>();
     if (!isGoingFirst)
     {
         this.startCards++;
     }
     for (int i = 0; i < startCards; i++)
     {
         DrawCard();
     }
     Singletons.GetPrinter().StartCards(playerSetup, startCards, isGoingFirst, myHand);
 }