Finalised implementation of the walker class with method split
This commit is contained in:
		@@ -37,6 +37,11 @@ class Walker:
 | 
				
			|||||||
        if 0 < nx < width and 0 < ny < height:
 | 
					        if 0 < nx < width and 0 < ny < height:
 | 
				
			||||||
            self.x, self.y = nx, ny
 | 
					            self.x, self.y = nx, ny
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def split():
 | 
				
			||||||
 | 
					        child = Walker(self.x, self.y)
 | 
				
			||||||
 | 
					        child.dir = self.dir
 | 
				
			||||||
 | 
					        return child
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Generator:
 | 
					class Generator:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user