Beta

[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 to 15 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~ 😉

Graph Theory
Algorithms

More By Author:

Check out these other kata created by Just4FunCoder

Stats:

CreatedJun 26, 2022
PublishedJun 27, 2022
Warriors Trained15
Total Skips1
Total Code Submissions4
Total Times Completed2
BF Completions2
Total Stars3
% of votes with a positive feedback rating100% of 1
Total "Very Satisfied" Votes1
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes0
Total Rank Assessments1
Average Assessed Rank
2 kyu
Highest Assessed Rank
2 kyu
Lowest Assessed Rank
2 kyu
Ad
Contributors
  • Just4FunCoder Avatar
Ad