game006.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:eduActiv8 作者: imiolek-ireneusz 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号