from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys import socket import server from human import Human from gameinterface import Gameinterface playerone = Human() playertwo = Human() game = Gameinterface() port = 5614 class Serverwidget(QWidget): def __init__(self, parent=None): super().__init__() self.s = server.Serversocket(self) self.initUI() def initUI(self): #서버 설정(IP,Port 입력) self.setWindowTitle('서버') ipbox = QHBoxLayout() server_setting = QGroupBox('서버 설정') ipbox.addWidget(server_setting) ip_port_input_box = QHBoxLayout() label = QLabel('Server IP') self.ip = QLineEdit(socket.gethostbyname(socket.gethostname())) ip_port_input_box.addWidget(label) ip_port_input_box.addWidget(self.ip)
from gameinterface import Gameinterface print('\n--------------------------------------------------') print(' 숫자야구게임 ver 1.0 by khan ') print('--------------------------------------------------') print('\n 1:PvE 대전 2:PvP 대전 ') gameinterface = Gameinterface() gameinterface.gamerun()
from gameinterface import Gameinterface print('\n--------------------------------------------------') print(' 숫자야구게임 ver 0.3 by khan ') print('--------------------------------------------------') print('\n 1:PvE 대전 2:PvP 대전 ') gameinterface = Gameinterface() gameinterface._select_game_mode()