Ejemplo n.º 1
0
        public TournamentPlayer(Random random, Referee referee)
        {
            this.Random  = random;
            this.Referee = referee;
            // make a random deck
            this.Strategy = new MiniMaxStrategy(new DefaultHearthstoneGameEvaluator(), 1000);
            int i;
            LinkedList <ReadableCard> cards      = new LinkedList <ReadableCard>();
            IList <ReadableCard>      legalCards = referee.LegalCards;

            for (i = 0; i < referee.Starting_DeckSize; i++)
            {
                WritableCard newCard = legalCards[this.Random.Next(legalCards.Count)].Clone((WritableCard)null);
                //WritableCard newCard = legalCards[0].Clone((WritableCard)null);
                newCard.ID = IDFactory.NewID();
                cards.AddLast(newCard);
            }
            this.mainDeck = cards;
            // set up some mutation strategies
            this.MutationCounts = new Dictionary <DeckMutationStrategy, double>();
            this.MutationCounts[new DeckMutationStrategy()] = 6;
        }
Ejemplo n.º 2
0
 private void Initialize()
 {
     this.ID = IDFactory.NewID();
 }