using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    public class BestScore
    {

        public BestScore(int gamesPlayed, int score)
        {
            GamesPlayed = gamesPlayed;
            Score = score;
            if (GamesPlayed < 0)
                GamesPlayed = 0;
            if (Score < 0)
                Score = 0;
        }

        public int GamesPlayed { get; private set; }

        private int _score;
        public int Score 
        { 
            get
            {
                return _score;
            }
            private set
            {
                if (value > _score)
                    _score = value;
            }
        }

        public void IncrGamesPlayed()
        {
            GamesPlayed += 1;
        }
    }
}
