Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAuriau committed Nov 1, 2023
1 parent c2a408a commit c5ad57e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyalapin/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ def deepcopy(self, light=True):
copied_material = self.light_deep_copy_material()
else:
copied_material = self.deep_copy_material()

assert len(copied_material["black"]["alive"]["king"]) > 0, "Black king is dead ?"
assert len(copied_material["white"]["alive"]["king"]) > 0, "White king is dead ?"
copied_object.white_king = copied_material["white"]["alive"]["king"][0]
copied_object.black_king = copied_material["black"]["alive"]["king"][0]
copied_object.all_material = copied_material
Expand Down
2 changes: 2 additions & 0 deletions pyalapin/interface/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ def click_cell(self, event):
)

self.first_cell_clicked = None
if not validated_move:
self.update()


class MyApp(App):
Expand Down

0 comments on commit c5ad57e

Please sign in to comment.