I\'m trying to make an algorithm for detecting a closed path in a grid. Here\'s the game I\'m trying to make:
https://www.youtube.com/watch?v=ZsmcU3jtCx0&feature=yout