Esempio n. 1
0
        public void IsImmediateWinSuccessForPlayerX()
        {
            int  score  = MoveScoreConverter.ConvertWin(Occupied.PlayerX, 0);
            bool result = MoveScoreConverter.IsImmediateWin(Occupied.PlayerX, score);

            Assert.IsTrue(result);
        }
Esempio n. 2
0
        public void WinForPlayerYIsNotWinForPlayerX()
        {
            int  score  = MoveScoreConverter.ConvertWin(Occupied.PlayerY, 0);
            bool result = MoveScoreConverter.IsImmediateWin(Occupied.PlayerX, score);

            Assert.IsFalse(result);
        }
Esempio n. 3
0
        public void NegativeScoreIsNotImmediateWin()
        {
            const int Score      = -12;
            bool      resultForX = MoveScoreConverter.IsImmediateWin(Occupied.PlayerX, Score);
            bool      resultForY = MoveScoreConverter.IsImmediateWin(Occupied.PlayerY, Score);

            Assert.IsFalse(resultForX, "X");
            Assert.IsFalse(resultForY, "Y");
        }
Esempio n. 4
0
        public void LaterWinForPLayerXIsNotImmediateWin()
        {
            int  score      = MoveScoreConverter.ConvertWin(Occupied.PlayerX, 1);
            bool resultForX = MoveScoreConverter.IsImmediateWin(Occupied.PlayerX, score);
            bool resultForY = MoveScoreConverter.IsImmediateWin(Occupied.PlayerY, score);

            Assert.IsFalse(resultForX, "X");
            Assert.IsFalse(resultForY, "Y");
        }