im so fucking lost

This commit is contained in:
Heli-o 2024-01-05 21:45:03 +01:00
parent 0433665878
commit 56b3f0a6f1

View file

@ -74,7 +74,7 @@ class Piece:
queue.append(neighbor_piece) queue.append(neighbor_piece)
# Check if all pieces are connected # Check if all pieces are connected
return len(visited) != len(remaining_pieces) return len(visited) == len(remaining_pieces)
def get_valid_jumps() -> list: def get_valid_jumps() -> list:
raise NotImplementedError raise NotImplementedError
@ -311,8 +311,6 @@ class Player(Base.Board):
for piece in row.values() for piece in row.values()
if piece and piece.team and piece.validate_jumps(self.translated_board) if piece and piece.team and piece.validate_jumps(self.translated_board)
] ]
print(movable_pieces)
input()
chosen_piece = self.random_piece(movable_pieces) # -> can be None, usually the cause for an error chosen_piece = self.random_piece(movable_pieces) # -> can be None, usually the cause for an error
if chosen_piece: if chosen_piece:
new_p, new_q = random.choice( new_p, new_q = random.choice(