private static bool IsDirectionPreserved(IAsciiMap map, IAsciiField field, PathDirection direction)
        {
            var nextField = map.GetFieldInDirection(direction, field);

            return(nextField != null &&
                   IsPassableCharacter(nextField.Character));
        }
        private static bool IsDirectionValid(IAsciiMap map, IAsciiField field, PathDirection direction)
        {
            var nextField = map.GetFieldInDirection(direction, field);

            return(nextField != null &&
                   !nextField.AlreadyVisited &&
                   IsPassableCharacter(nextField.Character));
        }
        public static void FindPath(IAsciiMap map, IAsciiField currentField, PathDirection currentDirection)
        {
            map.AddPathCharacter(currentField);
            var         directionToMoveNext = ScanArea(map, currentField, currentDirection);
            IAsciiField nextField           = map.GetFieldInDirection(directionToMoveNext, currentField);

            if (IsAsciiEndCharacter(nextField.Character))
            {
                map.AddPathCharacter(nextField);
            }
            else
            {
                FindPath(map, nextField, directionToMoveNext);
            }
        }