//====== private static methods

        private static IHiScores GetFakeHiScores()
        {
            var result = new HiScores();

            result.TryAdd(new HiScoresEntry("Janusz", 10));
            result.TryAdd(new HiScoresEntry("Stefan", 20));
            result.TryAdd(new HiScoresEntry("Barbara", 30));
            result.TryAdd(new HiScoresEntry("Dawid", 40));

            return(result);
        }
        //====== IHiScoresUpdater

        public int?RegisterNewResult(string playerName, int score)
        {
            if (score < 1)
            {
                return(null);
            }

            var copy = new HiScores(GetHiScores());

            int?placement = copy.TryAdd(new HiScoresEntry(playerName, score));

            if (placement.HasValue)
            {
                hiScoresStorage.Save(copy);
            }

            return(placement);
        }