private MapOfCardsForGameSubset <ForwardAndReversePerTurnPlayerCounters> ContstructCounterPerTurn(int playerCount, CardGameSubset gameSubset) { var result = new MapOfCardsForGameSubset <ForwardAndReversePerTurnPlayerCounters>(gameSubset); foreach (Card card in gameSubset) { result[card] = new ForwardAndReversePerTurnPlayerCounters(playerCount); } return(result); }
public void EndGame(GameState gameState, ForwardAndReversePerTurnPlayerCounters turnCounters) { this.forwardTotal.Add(gameState, this.currentGameData); if (turnCounters != null) { this.forwardTotal.GrowToSize(gameState, turnCounters.forwardTotal); this.reverseTotal.GrowToSize(gameState, turnCounters.reverseTotal); this.currentGameData.GrowToSize(gameState, turnCounters.currentGameData); } this.currentGameData.Reverse(gameState); this.reverseTotal.Add(gameState, this.currentGameData); this.currentGameData.Clear(gameState); }
public StatsPerTurnGameLog(int playerCount, CardGameSubset gameSubset) { this.turnCounters = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.coinToSpend = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.cardsGained = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.ruinsGained = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.cursesGained = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.cursesTrashed = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.victoryPointTotal = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.deckShuffleCount = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.oddsOfBeingAheadOnRoundEnd = new ForwardAndReversePerTurnPlayerCounters(playerCount); this.oddsOfHittingAtLeastACoinAmount = new ForwardAndReversePerTurnPlayerCounters[9]; for (int i = 0; i < this.oddsOfHittingAtLeastACoinAmount.Length; ++i) { this.oddsOfHittingAtLeastACoinAmount[i] = new ForwardAndReversePerTurnPlayerCounters(playerCount); } this.cardGameSubset = gameSubset; this.cardsTotalCount = ContstructCounterPerTurn(playerCount, gameSubset); this.carsGainedOnTurn = ContstructCounterPerTurn(playerCount, gameSubset); this.endOfGameCardCount = ContstructCounter(playerCount, gameSubset); }