some final touches

This commit is contained in:
Ruediger Ludwig 2022-12-30 08:44:41 +01:00
parent 0843624f17
commit cf05072def
3 changed files with 77 additions and 101 deletions

View file

@ -83,7 +83,7 @@ class Cave:
old = self.cave[block.y]
self.cave[block.y] = old[:block.x] + '#' + old[block.x + 1:]
@ classmethod
@classmethod
def create(cls, width: int, gas_pushes: str) -> Self:
cave = []
return cls(width, cave, cycle(gas_pushes), cycle(Pattern(pattern) for pattern in patterns))