diff --git a/pyalapin/engine/engine.py b/pyalapin/engine/engine.py index ffb626e..c048c64 100644 --- a/pyalapin/engine/engine.py +++ b/pyalapin/engine/engine.py @@ -430,8 +430,12 @@ def deepcopy(self, light=True): 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 ?" + 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 diff --git a/pyalapin/interface/interface.py b/pyalapin/interface/interface.py index 5971d02..5e1d0e7 100644 --- a/pyalapin/interface/interface.py +++ b/pyalapin/interface/interface.py @@ -315,11 +315,19 @@ def click_cell(self, event): if game_is_on[0]: self.update() ( - self.cells[ai_move.start.x][ai_move.start.y].background_normal, - self.cells[ai_move.start.x][ai_move.start.y].background_down, + self.cells[ai_move.start.x][ + ai_move.start.y + ].background_normal, + self.cells[ai_move.start.x][ + ai_move.start.y + ].background_down, ) = ( - self.cells[ai_move.start.x][ai_move.start.y].background_down, - self.cells[ai_move.start.x][ai_move.start.y].background_normal, + self.cells[ai_move.start.x][ + ai_move.start.y + ].background_down, + self.cells[ai_move.start.x][ + ai_move.start.y + ].background_normal, ) ( self.cells[ai_move.end.x][ai_move.end.y].background_normal,