BFS solution for a mobile game https://play.google.com/store/apps/details?id=grunt.WarpQuest