arbirary maze sizes

This commit is contained in:
Stephen McQuay 2012-10-31 22:33:50 -07:00
parent b5443cb424
commit 291b12d9b1
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,9 @@
import sys
from maze import make_maze from maze import make_maze
m = make_maze() size = 8
print m if len(sys.argv) == 2:
size = int(sys.argv[1])
m = make_maze(size)
sys.stdout.write('{}'.format(m))

View File

@ -44,7 +44,7 @@ class CS235Maze(object):
return success, path return success, path
def __str__(self): def __str__(self):
r = derp_transpose(self._data) r = derp_transpose(self._data, self._size)
rs = '' rs = ''
for i in xrange(self._size): for i in xrange(self._size):
for j in xrange(self._size): for j in xrange(self._size):