Example #1
0
        public void lostOneLifeShouldRemoveOneLife()
        {
            AnimatedWordsScreen screen = new AnimatedWordsScreen(60, 20);
            int initialLives           = screen.livesLeft();

            screen.looseOneLive();
            Assert.AreEqual(initialLives - 1, screen.livesLeft());
        }
Example #2
0
        public void afterLoosingLastLiveShouldGameOver()
        {
            AnimatedWordsScreen screen = new AnimatedWordsScreen(60, 20);

            while (screen.livesLeft() > 0)
            {
                Assert.False(screen.gameOver());
                screen.looseOneLive();
            }
            Assert.True(screen.gameOver());
        }