Update Algorithmen/Brute Force

2026-06-08 09:19:48 +00:00
parent aebeb5d994
commit 1da4e51467

@@ -13,10 +13,12 @@ jede Stelle die Rotation einer Zelle festlegt.
for piece in board: for piece in board:
piece.direction = up piece.direction = up
board[0][0].rotate_cw() # Lösen
prev = board[0][0] while not solved:
for piece in board[1:]: board[0][0].rotate_cw()
if prev.direction = up: prev = board[0][0]
for piece in board[1:]:
if prev.direction == up:
piece.rotate_cw() piece.rotate_cw()
else: else:
break break