Example #1
0
        public void AddPlay(PlayType type, int turn, string cardId)
        {
            var turnStats = TurnStats.FirstOrDefault(t => t.Turn == turn);

            if (turnStats == null)
            {
                turnStats = new TurnStats {
                    Turn = turn
                };
                TurnStats.Add(turnStats);
            }
            turnStats.AddPlay(type, cardId);
            Logger.WriteLine(string.Format("New play: {0} ({1}, turn: {2})", type, cardId, turn), "GameStats");
        }
Example #2
0
        public void AddPlay(PlayType type, int turn, string cardId)
        {
            var turnStats = TurnStats.FirstOrDefault(t => t.Turn == turn);

            if (turnStats == null)
            {
                turnStats = new TurnStats {
                    Turn = turn
                };
                TurnStats.Add(turnStats);
            }
            turnStats.AddPlay(type, cardId);
            Logger.WriteLine($"New play: {type} ({cardId}, turn: {turn})", "GameStats", 2);
        }