/// <summary>
 /// Constructor of the class game engine, initialize key components 
 /// corresponding to the inputed difficulty
 /// </summary>
 public GameEngine(string difficulty)
 {
     this.scoreBoard = new Score();
     this.difficulty = difficulty;
     this.Matrix = GenerateMatrix();
     this.userMoves = 0;
 }
        public void TestInputedPlayer()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Gosho", 14);
            scoresList.AddPlayer("Pesho", 15);

            Assert.AreEqual("Gosho", scoresList.players[0].Name);
        }
        public void TestAddPlayer()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Gosho", 14);
            scoresList.AddPlayer("Pesho", 15);

            Assert.AreEqual(2, scoresList.players.Count);
        }
        public void TestGetScoreBoard()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Pesho", 14);
            string actual = scoresList.GetScoreBoard();
            string expected = "---------TOP FIVE SCORES-----------\n1.Pesho - 14\n-----------------------------------";

            Assert.AreEqual(expected, actual);
        }
        public void TestIsPlayerGoodEnoughFivePlayersMorePoints()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Gosho", 11);
            scoresList.AddPlayer("Pesho", 12);
            scoresList.AddPlayer("Peter", 13);
            scoresList.AddPlayer("Ivan", 18);
            scoresList.AddPlayer("Maria", 15);

            bool result = scoresList.IsGoodEnough(21);

            Assert.AreEqual(false, result);
        }
        public void TestAddingMoreThanFivePlayers()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Gosho", 11);
            scoresList.AddPlayer("Pesho", 12);
            scoresList.AddPlayer("Peter", 13);
            scoresList.AddPlayer("Georgi", 13);
            scoresList.AddPlayer("Ivan", 18);

            scoresList.AddPlayer("Maria", 15);

            Assert.AreEqual("Maria", scoresList.players[4].Name);
        }
        public void TestIsPlayerGoodEnoughLessThanFivePlayers()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Gosho", 11);
            scoresList.AddPlayer("Pesho", 12);
            scoresList.AddPlayer("Peter", 13);
            scoresList.AddPlayer("Ivan", 18);

            bool result = scoresList.IsGoodEnough(21);

            Assert.AreEqual(true, result);
        }
        public void TestSort()
        {
            Score scoresList = new Score();
            scoresList.AddPlayer("Pesho", 14);
            scoresList.AddPlayer("Peter", 13);
            scoresList.AddPlayer("Ivan", 18);
            scoresList.AddPlayer("Gosho", 11);
            scoresList.AddPlayer("Maria", 15);

            scoresList.Sort();

            Assert.AreEqual("Gosho", scoresList.players[0].Name);
        }