def handle(self, event):
gd.BoardGame.handle(self, event) # send event handling up
if event.type == pygame.MOUSEBUTTONDOWN and self.show_msg == False and self.start_sequence == False:
if 0 <= self.board.active_ship < self.square_count:
active = self.board.ships[self.board.active_ship]
if active.unit_id in self.chosen:
active.initcolor = self.highlight_color
active.color = active.initcolor
self.found.add(active.unit_id)
if len(self.found) == self.current_count:
self.completed_mode = True
self.ai_enabled = True
else:
active.initcolor = (255, 0, 0)
active.color = active.initcolor
self.game_over_mode = True # self.game_over()
self.ai_enabled = True
评论列表
文章目录