komplexeres wfc, funktioniert jetzt immer
This commit is contained in:
@@ -20,10 +20,11 @@ class Grid:
|
||||
raise ValueError("Feldgrösse nicht erlaubt")
|
||||
with open(f"descriptions/{width}x{height}.txt") as f:
|
||||
lines = f.readlines()
|
||||
if specific:
|
||||
if specific is not None:
|
||||
selected = lines[specific].strip()
|
||||
else:
|
||||
selected = choice(lines).strip()
|
||||
print(f"Seed: {lines.index(selected + "\n")}")
|
||||
self.pieces = parse_description(selected)
|
||||
|
||||
def neighbors(self, x: int, y: int) -> list[Coordinate]:
|
||||
|
||||
Reference in New Issue
Block a user