reversi_window.py 文件源码

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

项目:reversi_ai 作者: andysalerno 项目源码 文件源码
def poll_msg_queue(self):
        self.board = self.socket_receiver.get_board()
        self.repaint()

        winner = self.socket_receiver.get_winner()
        if winner is not None:
            dialog = QtWidgets.QMessageBox()
            dialog.setText('{} wins.'.format(winner))
            dialog.exec_()

        player_with_no_moves = self.socket_receiver.get_no_moves()
        if player_with_no_moves is not None:
            name = color_name[player_with_no_moves]
            dialog = QtWidgets.QMessageBox()
            dialog.setText('{} had no moves, skipping turn.'.format(name))
            dialog.exec_()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号