public IActionResult HighScores()
        {
            var hsm = new HighScoreViewModel();

            hsm.HighScores = HighScoreRepo.GetHighScores();
            return(View(hsm));
        }
        public IActionResult Add(int Score, string Player)
        {
            var highscore = new HighScore()
            {
                Player = Player,
                Score  = Score
            };

            HighScoreRepo.CreateHighScore(highscore);
            return(RedirectToAction("Highscores", "Home"));
        }
Beispiel #3
0
 public void Awake()
 {
     scores = HighScoreRepo.Load(highScoresFile);
     HideInput();
 }