示例#1
0
        public bool IsNewHighScore(HighScore score)
        {
            bool             retValue = false;
            List <HighScore> items    = this.HiScore.Value;

            if (items.Count < 10)
            {
                retValue = true;
            }
            else
            {
                items = items.OrderByDescending(x => x.TotalScore).Where(x => x.TotalScore < score.TotalScore).ToList();
                if (items.Count != 0)
                {
                    retValue = true;
                }
            }
            return(retValue);
        }
示例#2
0
        private void LoadSettings()
        {
            textCurrentSum.Visibility = (bool)AppContext.Instance.ShowSum.Value ? Visibility.Visible : Visibility.Collapsed;
            bool.TryParse(this.NavigationContext.QueryString["NewGame"], out _newGame);
            if (!_newGame)
            {
                _currentLevelIndex = AppContext.Instance.CurrentLevelIndex.Value;
                _currentStar       = AppContext.Instance.CurrentStar.Value;
            }
            else
            {
                AppContext.Instance.CurrentProgress.Value = AppContext.LEVELTIME;
                _currentLevelIndex = AppContext.Instance.StartLevel.Value;
            }
            _hiscore = AppContext.Instance.GetLastHighScore();

            SetupLevel();
            for (int n = 1; n <= _currentStar - 1; n++)
            {
                SetStarStyle(n, StarStyleEnum.Solved);
            }
            SetStarStyle(_currentStar, StarStyleEnum.Active);
        }
示例#3
0
        private bool IsNewHighScore(HighScore score)
        {
            bool retValue = AppContext.Instance.IsNewHighScore(score);

            return(retValue);
        }