Minesweeper.MineSweeperGame.GetCurrentScore C# (CSharp) Méthode

GetCurrentScore() public méthode

public GetCurrentScore ( ) : int
Résultat int
        public int GetCurrentScore()
        {
            return currentScore;
        }

Usage Example

        private void ShowScore(MineSweeperGame g)
        {
            int currentScore = g.GetCurrentScore ();
            if (currentScore > highScore) {
                highScore = currentScore;
                preferences.Put(HIGHSCOREKEY, highScore.ToString());
            }

            currentScoreLabel.Text = currentScore.ToString ();
            highScoreLabel.Text = highScore.ToString ();
        }