started to think about solving the maze

This commit is contained in:
Stephen McQuay 2012-10-30 22:29:47 -07:00
parent cd7c65fc33
commit 66a370b634
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,4 @@
from maze import make_maze
print make_maze()
m = make_maze()
print m

View File

@ -3,3 +3,4 @@ import sys
from maze import parse_maze
m = parse_maze(sys.stdin.read())
print m.solve()

View File

@ -7,6 +7,12 @@ class CS235Maze(object):
self.data = data
self.size = size
def _solve(self, x, y, z):
return False, set()
def solve(self):
return self._solve(0, 0, 0)
def __str__(self):
r = derp_transpose(self.data)
rs = ''
@ -35,7 +41,7 @@ def parse_maze(maze):
for j in k.split('\n')]
for k in maze.split('\n\n') if k]
cleaned = derp_transpose(soilded)
return cleaned
return CS235Maze(cleaned)
def derp_transpose(s, size=8):