Ejemplo n.º 1
0
        public async Task AddGameResultAsync(GameResultDTO result)
        {
            if (_leaderBoardStorageContainer == null)
            {
                _leaderBoardStorageContainer = new LeaderBoardStorageContainer();
            }

            _leaderBoardStorageContainer.Results.Add(result);

            _leaderBoardStorageHelper.SaveASync(_leaderBoardStorageContainer, DimesoftMemoryFileName);
        }
Ejemplo n.º 2
0
        private static string TryGetSecondaryTileArrayItem(GameResultDTO[] asArray, int index)
        {
            try
            {
                var asDto = asArray[index];

                return string.Format("{0} Moves: {1}", asDto.Attempts, asDto.PlayerName);
            }
            catch (Exception e)
            {
                return "";
            }
        }
Ejemplo n.º 3
0
 public GameLeaderBoardItem( GameResultDTO gameResult)
 {
     _gameResult = gameResult;
 }
Ejemplo n.º 4
0
        private static string TryGetAppTileArrayItem(GameResultDTO[] asArray, int index)
        {
            try
            {
                var asDto = asArray[index];

                return string.Format("{0} [{1}] in {2} attempts by {3}", asDto.GameCategory, asDto.GameLevel, asDto.Attempts, asDto.PlayerName);
            }
            catch (Exception e)
            {
                return "";
            }
        }