当前位置: 首页 > news >正文

免费网站空间怎么办网络销售是什么

免费网站空间怎么办,网络销售是什么,深圳做网站需要多少钱,wordpress主题安装路径图片和代码资源已经上传到百度云,链接:https://pan.baidu.com/s/1g0OO-8k-GNO9I4ZbFt1AXw 图形界面引用PyQt5,还有socket通信。可以局域网对战,可以人机对战,应该存在一些小的bug,但是还没有找出来。希望读者可以找到,哈哈… 下面附几张运行的截图: 五子棋.py代码…

图片和代码资源已经上传到百度云,链接:https://pan.baidu.com/s/1g0OO-8k-GNO9I4ZbFt1AXw

图形界面引用PyQt5,还有socket通信。可以局域网对战,可以人机对战,应该存在一些小的bug,但是还没有找出来。希望读者可以找到,哈哈…

下面附几张运行的截图:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五子棋.py代码:


from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
import sysimport MyButton
import DoublePlayerGame
import SinglePlayerGame
from NetConfig import *
import NetPlayerGameclass Mainwindow(QWidget):def __init__(self,parent = None):super().__init__(parent)self.resize(760,650)self.setWindowTitle("我的五子棋")#设置窗口图标self.setWindowIcon(QIcon("source/icon.ico"))#设置背景图片p = QPalette(self.palette())#获得当前的调色板brush = QBrush(QImage("source/五子棋界面.png"))p.setBrush(QPalette.Background,brush)#设置调色版self.setPalette(p)#给窗口设置调色板self.singlePlayerBtn = MyButton.MyButton('source/人机对战_hover.png','source/人机对战_normal.png','source/人机对战_press.png',parent=self)self.singlePlayerBtn.move(300,300)self.dancelePlayerBtn = MyButton.MyButton('source/双人对战_hover.png','source/双人对战_normal.png','source/双人对战_press.png',parent=self)self.dancelePlayerBtn.move(300,400)#self.dancelePlayerBtn.clicked.connect(DoublePlayerGame)self.drawlePlayerBtn = MyButton.MyButton('source/联机对战_hover.png','source/联机对战_normal.png','source/联机对战_press.png',parent=self)self.drawlePlayerBtn.move(300,500)#绑定开始双人游戏信号和槽函数self.dancelePlayerBtn.clicked.connect(self.startDoubliGame)self.singlePlayerBtn.clicked.connect(self.startSingleGame)self.drawlePlayerBtn.clicked.connect(self.startNetGame)def startDoubliGame(self):print("in")#构建双人对战界面self.doublePlayerGame = DoublePlayerGame.DoublePlayGame()#绑定返回界面self.doublePlayerGame.backSignal.connect(self.showStartGame)self.doublePlayerGame.show()#显示游戏界面self.close()def startSingleGame(self):self.SingleGame = SinglePlayerGame.SinglePlayerGame()self.SingleGame.backSignal.connect(self.showStartGame2)self.SingleGame.show()self.close()def startNetGame(self):self.netConfig = NetConfigWidget()self.netConfig.exit_signal.connect(self.show)self.netConfig.show()self.netConfig.config_signal.connect(self.receiveNetConfig)self.close()def receiveNetConfig(self,nettype,name,ip,port):'''接收网络配置信息'''print("net config:",nettype,name,ip,port)if nettype == "client":net_object = NetClient(name,ip,port)elif nettype == "server":net_object = NetServer(name,ip,port)else:returnself.netPlayerGame = NetPlayerGame.NetPlayerGame(net_object=net_object)self.netPlayerGame.backSignal.connect(self.show)self.close()self.netPlayerGame.show()self.netConfig.hide()'''lbl = QLabel(self)pix = QPixmap("source/人机大战_norma.")'''#显示开始界面def showStartGame(self):self.show()self.doublePlayerGame.close()def showStartGame2(self):self.show()self.SingleGame.close()if __name__ == "__main__":import cgitbcgitb.enable("text")a = QApplication(sys.argv)m = Mainwindow()m.show()sys.exit(a.exec_())

doubleplayergame.py代码:

from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5 import *
import sysclass Chessman(QLabel):def __init__(self, color = "black",parent = None):super().__init__(parent)self.color = colorself.pic = Noneif self.color == "black":self.pic = QPixmap("source/黑子.png")else:self.pic = QPixmap("source/白子.png")self.setPixmap(self.pic)self.setFixedSize(self.pic.size())#设置棋子大小self.show()self.x = 0self.y = 0def move(self,a0:QtCore.QPoint):super().move(a0.x()-15,a0.y()-15)def setIndex(self,x,y):self.x = xself.y = yimport MyButtonclass DoublePlayGame(QWidget):backSignal = pyqtSignal()#返回信号def __init__(self,parent = None):super().__init__(parent=parent)#左上角chessboard[0][0]#右上角chessboard[0][18]#左下角chessboard[18][0]#右下角chessboard[18][18]#chessboard[行下标][列下标]self.chessboard = [[None for i in range(19)] for i in range(19)]#落子棋子颜色self.turnChessColor = "black"self.history = []self.history2 = []self.is_over = False#配置背景图p = QPalette(self.palette())#获得当前的调色板brush = QBrush(QImage("source/游戏界面.png"))p.setBrush(QPalette.Background,brush)#设置调色版self.setPalette(p)#给窗口设置调色板#设置标题#self.resize(760,650)self.setWindowTitle("双人联机")#设置窗口图标self.setWindowIcon(QIcon("source/icon.ico"))#设置窗口大小self.setFixedSize(QImage("source/游戏界面.png").size())self.backBtn = MyButton.MyButton('source/返回按钮_hover.png','source/返回按钮_normal.png','source/返回按钮_press.png',parent=self)self.backBtn.move(650,50)self.startBtn = MyButton.MyButton('source/开始按钮_hover.png','source/开始按钮_normal.png','source/开始按钮_press.png',parent=self)self.startBtn.move(650,300)self.returnBtn = MyButton.MyButton('source/悔棋按钮_hover.png','source/悔棋按钮_normal.png','source/悔棋按钮_press.png',parent=self)self.returnBtn.move(650,400)self.loseBtn = MyButton.MyButton('source/认输按钮_hover.png','source/认输按钮_normal.png','source/认输按钮_press.png',parent=self)self.loseBtn.move(650,500)#绑定返回按钮self.backBtn.clicked.connect(self.goBack)self.startBtn.clicked.connect(self.restar)self.loseBtn.clicked.connect(self.lose)self.returnBtn.clicked.connect(self.huiback)self.gameStatu = []self.focusPoint = QLabel(self)self.focusPoint.setPixmap(QPixmap("source/标识.png"))def goBack(self):self.backSignal.emit()self.close()def closeEvent(self, a0: QtGui.QCloseEvent):self.backSignal.emit()def mouseReleaseEvent(self, a0: QtGui.QMouseEvent):if self.gameStatu == False:return None
http://www.hengruixuexiao.com/news/49429.html

相关文章:

  • 做网站上传服务器杭州seo首页优化软件
  • 网站建设维护招聘中央人民政府网
  • 灵犀科技网站建设哈尔滨网站推广
  • 文山文山市网站建设如何做好网络推广销售
  • 电子商务网站开发课程教案企业seo排名外包
  • 无锡自助建站软件百度免费下载
  • 唐山中企动力做网站百度seo排名优化提高流量
  • 成都公司做网站网站推广关键词排名优化
  • 可以做问答的网站torrentkitty磁力猫引擎
  • 湖南网站seo公司手机如何做网站
  • 给客户做非法网站网页设计代码大全
  • 个人社保缴费记录查询win7优化软件
  • 设计公司网站建设费用友情链接可以帮助店铺提高浏览量
  • php网站搭建环境搭建搜索网页
  • 潍坊微信网站今日的新闻
  • 网站2级目录怎么做的搜索引擎优化的核心本质
  • 网站模板模仿网页搜索优化seo
  • 网站咨询弹窗是怎么做的近期国际新闻
  • 做网站的材料咸阳网络推广
  • 苹果网站导航条seo英文
  • 做网站很简单重庆百度推广电话
  • 哪些网站建设公司好aso优化费用
  • 淘宝联盟网站怎么建设互联网营销师培训机构哪家好
  • 做桑拿网站挣钱吗扬州百度seo
  • 福建省城市建设厅网站新东方在线koolearn
  • 武汉网站建设招聘百度seo公司哪家强一点
  • 在线flash相册网站源码浙江网站建设制作
  • 郑州七彩网站建设公司 概况网络营销的目的和意义
  • 深圳石岩建网站营销型网站建设托管
  • 做网站要买服务器吗专业拓客公司联系方式