Пример #1
0
        public void ExitNotFoundWhenPlayerNotReachedLabyrinthBorder()
        {
            IMoveHandler        moveHandler = new MoveHandler();
            ILabyrinthPlayField labyrinth   = new MockLabyrinth();

            Assert.IsFalse(moveHandler.ExitFound(labyrinth, labyrinth.CurrentCell));
        }
Пример #2
0
        public void ExitFoundWhenPlayerReachedLabyrinthBorder()
        {
            IMoveHandler        moveHandler = new MoveHandler();
            ILabyrinthPlayField labyrinth   = new MockLabyrinth();

            moveHandler.MoveAction(labyrinth, Command.Right);

            Assert.IsTrue(moveHandler.ExitFound(labyrinth, labyrinth.CurrentCell));
        }
Пример #3
0
        public void MoveToEmptyCellShouldBeValid()
        {
            IMoveHandler        moveHandler = new MoveHandler();
            ILabyrinthPlayField labyrinth   = new MockLabyrinth();
            bool result;

            result = moveHandler.MoveAction(labyrinth, Command.Up);

            Assert.IsTrue(result);
        }
Пример #4
0
        public void MoveToTheWallShouldBeInvalid()
        {
            IMoveHandler        moveHandler = new MoveHandler();
            ILabyrinthPlayField labyrinth   = new MockLabyrinth();
            bool result;

            result = moveHandler.MoveAction(labyrinth, Command.Down);

            Assert.IsFalse(result);
        }