pep8 fixings
This commit is contained in:
parent
684afb8d52
commit
d20f51b986
@ -19,7 +19,7 @@ class CS235Maze(object):
|
|||||||
elif self._data[x][y][z] != EMPTY:
|
elif self._data[x][y][z] != EMPTY:
|
||||||
return False
|
return False
|
||||||
elif x == self._size - 1 and y == self._size - 1 \
|
elif x == self._size - 1 and y == self._size - 1 \
|
||||||
and z == self._size - 1:
|
and z == self._size - 1:
|
||||||
self._data[x][y][z] = PATH
|
self._data[x][y][z] = PATH
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@ -35,7 +35,6 @@ class CS235Maze(object):
|
|||||||
self._data[x][y][z] = TEMP
|
self._data[x][y][z] = TEMP
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def solve(self):
|
def solve(self):
|
||||||
return self._solve(0, 0, 0)
|
return self._solve(0, 0, 0)
|
||||||
|
|
||||||
@ -64,8 +63,8 @@ def make_maze(size=8):
|
|||||||
|
|
||||||
def parse_maze(maze):
|
def parse_maze(maze):
|
||||||
soilded = [[[int(i) for i in j.split()]
|
soilded = [[[int(i) for i in j.split()]
|
||||||
for j in k.split('\n')]
|
for j in k.split('\n')]
|
||||||
for k in maze.split('\n\n') if k]
|
for k in maze.split('\n\n') if k]
|
||||||
cleaned = derp_transpose(soilded, size=len(soilded))
|
cleaned = derp_transpose(soilded, size=len(soilded))
|
||||||
return CS235Maze(cleaned)
|
return CS235Maze(cleaned)
|
||||||
|
|
||||||
|
@ -81,7 +81,6 @@ class MazeTests(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
self.m = parse_maze(s)
|
self.m = parse_maze(s)
|
||||||
|
|
||||||
|
|
||||||
def test_at_indices(self):
|
def test_at_indices(self):
|
||||||
assert self.m._data[7][0][0] == 0
|
assert self.m._data[7][0][0] == 0
|
||||||
assert self.m._data[7][3][0] == 1
|
assert self.m._data[7][3][0] == 1
|
||||||
|
Loading…
Reference in New Issue
Block a user