paint-it.py 文件源码

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

项目:paint-it 作者: plainspooky 项目源码 文件源码
def check_game(self):
        if self.moves > self.max_moves:
            self.status='lose'
            self.screen.addstr( self.moves_position[0], self.offset_x, "YOU LOSE!", curses.color_pair(4))
        else:
            self.status='win'
            color = self.arena[0][0]
            for y in range(self.arena_size):
                for x in range(self.arena_size):
                    if self.arena[y][x] != color:
                        self.status='play'
                        break;
        if self.status=='win' and self.moves<=self.max_moves:
            self.screen.addstr( self.moves_position[0], self.offset_x, "YOU WIN!", curses.color_pair(2))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号