Beispiel #1
0
        public void Reset()
        {
            int maximumLives = 3, livesToDecrement = 1;
            var striker = new Striker(new MockBoard(), new MockConsoleWriter());

            striker.ReduceLives(livesToDecrement);
            striker.MoveRight();

            Assert.NotEqual(maximumLives, striker.GetLivesLeft());
            Assert.NotEqual(0, striker.GetMovesTaken());

            striker.Reset();

            Assert.Equal(maximumLives, striker.GetLivesLeft());
            Assert.Equal(0, striker.GetMovesTaken());
        }
Beispiel #2
0
        public void ReduceLives()
        {
            int initialLives = 3, livesToDecrement = 1;

            var striker = new Striker(new MockBoard(), new MockConsoleWriter(), initialLives);

            striker.ReduceLives(livesToDecrement);

            Assert.Equal(initialLives - livesToDecrement, striker.GetLivesLeft());
        }