[BF] Yet Another Maze Kata
Description:
Task description
Determine if there exists a path that allows you to escape the maze by reaching the border of the map, but this time in BF!
Input
The input string (maze) will look something like this:
'#######\n# # \n# # # #\n#&# #\n#######\0'
Where:
'#'
represents a Wall — you can't walk through this.' '
represents a Path — you can walk through here.'&'
represents You — this is your starting position.'\n'
represents a Newline — mark the next line of the maze.- As usual, the input string is always terminated with
'\0'
.
About the maze
The maze is always rectangular or square.
The dimensions (width and height) of the maze range from
1
to15
characters.Only the above-specified characters (
'\n'
,' '
,'#'
,'&'
,'\0'
) will be present in the input string.
About you
You (and only a single copy of you) are always present in the maze.
You can only move horizontally or vertically by one space. (No diagonal movements!)
For debug purposes, the testcases also include a prettified input string with visually marked borders, like below:
.........
.#######.
.# # .
.# # # #.
.#&# #.
.#######.
.........
Output
Return the character 'T'
if there exists a path to escape the maze. Otherwise, return 'F'
.
Good Luck (you'll need it) & Have fun~ 😉
Similar Kata:
Stats:
Created | Jun 26, 2022 |
Published | Jun 27, 2022 |
Warriors Trained | 15 |
Total Skips | 1 |
Total Code Submissions | 4 |
Total Times Completed | 2 |
BF Completions | 2 |
Total Stars | 3 |
% of votes with a positive feedback rating | 100% of 1 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 1 |
Average Assessed Rank | 2 kyu |
Highest Assessed Rank | 2 kyu |
Lowest Assessed Rank | 2 kyu |