Update Algorithmen/Brute Force
@@ -13,10 +13,12 @@ jede Stelle die Rotation einer Zelle festlegt.
|
||||
for piece in board:
|
||||
piece.direction = up
|
||||
|
||||
# Lösen
|
||||
while not solved:
|
||||
board[0][0].rotate_cw()
|
||||
prev = board[0][0]
|
||||
for piece in board[1:]:
|
||||
if prev.direction = up:
|
||||
if prev.direction == up:
|
||||
piece.rotate_cw()
|
||||
else:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user