Example #1
0
 public static MockPlayerRepository GetInstance()
 {
     if (Instance == null)
     {
         Instance = new MockPlayerRepository();
     }
     return(Instance);
 }
Example #2
0
 public static MockPlayerRepository GetInstance()
 {
     if (Instance == null)
     {
         Instance = new MockPlayerRepository();
     }
     return Instance;
 }
Example #3
0
        public void Persist(PlayerInBattle playersInBattle)
        {
            int i = 1;

            foreach (int currentPlayerId in playersInBattle.Battle.Players)
            {
                playersInBattle = new PlayerInBattle()
                {
                    Battle       = playersInBattle.Battle,
                    Player       = MockPlayerRepository.GetInstance().Get(currentPlayerId),
                    PlayerNumber = i
                };

                Tuple <int, int> toPersist = new Tuple <int, int>(currentPlayerId, playersInBattle.Battle.BattleId);
                i++;
                datas[toPersist] = playersInBattle;
            }
        }