arbirary maze sizes
This commit is contained in:
parent
b5443cb424
commit
291b12d9b1
@ -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))
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user