main_menu.py 文件源码

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

项目:tensorflow_dqn_supermario 作者: JSDanielPark 项目源码 文件源码
def update_cursor(self, keys):
        """Update the position of the cursor"""
        input_list = [pg.K_RETURN, pg.K_a, pg.K_s]

        if self.cursor.state == c.PLAYER1:
            self.cursor.rect.y = 358
            if keys[pg.K_DOWN]:
                self.cursor.state = c.PLAYER2
            for input in input_list:
                if keys[input]:
                    self.reset_game_info()
                    self.done = True
        elif self.cursor.state == c.PLAYER2:
            self.cursor.rect.y = 403
            if keys[pg.K_UP]:
                self.cursor.state = c.PLAYER1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号