def __init__(self): # state constant self.BLACKTURN = 'BLACKTURN' self.WHITETURN = 'WHITETURN' self.BLACKWIN = 'BLACKWIN' self.WHITEWIN = 'WHITEWIN' self.GAMEOVER = 'GAMEOVER' # current state self.state = self.GAMEOVER # Players ('all' or 'any' or some nickname, or 'ai' for white) self.black = 'all' self.white = 'mouse' # deadlines self.deadline = 0 self.allDeadline = 0 self.promptCountdown = 0 # new chess data, [[pos1, num1], [pos2, num2], ...] self.data = [] # chessboard self.board = chessboard.Chessboard() # render screen self.screen = pygame.display.set_mode(bg_size) # danmuji self.dmj = danmuji.Gift(roomID) self.dmj.run() print('hello')
def __init__(self): # chessboard self.chessboard = chessboard.Chessboard() # chess self.chessqs = chess.createChessqs() self.chessQs = chess.createChessQs() # arrow self.arrowLeft = None self.arrowRight = None # self.idxed = -1
def __init__(self): self.chessboard = chessboard.Chessboard(8, 8) self.white_player = player.Player('w', self.chessboard) self.black_player = player.Player('b', self.chessboard) self.chessboard.set_pawns()
import chessboard c = chessboard.Chessboard() c.play()
def createChessboard(self): dimension = min(self.xUnit * 8, self.yUnit * 8) self.chessboard = chessboard.Chessboard(master=self, x=width / 2.0, y=height / 2.0, w=dimension, h=dimension, variant=self.settings["variant"], orientation=self.settings["color"])
def setUp(self): self.chessboard = chessboard.Chessboard()
def setUp(self): self.chessboard = chessboard.Chessboard(board_size=7)