Finalised implementation of the walker class with method split

This commit is contained in:
Charles Peyrat 2020-12-04 18:03:41 +01:00
parent a5c53c898e
commit bc9c7cd7f7
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,11 @@ class Walker:
if 0 < nx < width and 0 < ny < height:
self.x, self.y = nx, ny
def split():
child = Walker(self.x, self.y)
child.dir = self.dir
return child
class Generator: