Ejemplo n.º 1
0
        private void WhenAtFinishExitMazeAndRecord(MovementOption movementOption)
        {
            string finish = "F";

            if (movementOption.Value == finish)
            {
                var newPosition = this.moveHandler.MoveForward(this.Facing, this.Position);
                this.ExitMaze(newPosition);
            }
        }
Ejemplo n.º 2
0
        private void WhenNoWallMoveForwardAndRecord(MovementOption movementOption)
        {
            string noWall = " ";

            if (movementOption.Value == noWall)
            {
                var newPosition = this.moveHandler.MoveForward(this.Facing, this.Position);
                Position = newPosition;
                this.recordedMoves.Add(string.Format("Explorer Moved Forward to position {0}.", newPosition));
            }
        }