79281818

Date: 2024-12-15 04:52:47
Score: 1.5
Natty:
Report link

The comments suggesting various pathfinding algorithms are correct! Since you are only looking to determine if a level is playable and you are not looking for a shortest path, I recommend using Breadth-first search.

Simply consider the start of the algorithm to be the position of the character, and consider the children of each node to be a step in each cardinal direction. Run BFS until the door is found or all nodes have been visited and this will let you know if the level is playable.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: andres