def _drawGameBoardAndInfo(self): gu.drawEdges(self.board) gu.drawNodes(self.board) gu.drawNumbers(self.board) self.showMessage("Starting a new Game...", self.infoPanel, bg_color = gu.INFO_PANEL_COLOR, rect = gu.INFO_RECT) self.showMessage(gu.getSettingsPanelMessage(self.data), self.settingsPanel, bg_color = gu.SETTINGS_PANEL_COLOR, rect = gu.SETTINGS_PANEL_RECT) self.showMessage("Mr.X info", self.movesPanel, bg_color = gu.MOVES_PANEL_COLOR, rect = gu.MOVES_PANEL_RECT)
def update(self, new_gameStateData): """ Update the display with the new data supplied. """ self.data = new_gameStateData # update board self.board = self.STATIC_BOARD.copy() self._drawPlayers() self.screen.blit(self.board, gu.BOARD_RECT) # update settings panel self.showMessage(gu.getSettingsPanelMessage(self.data), self.settingsPanel, bg_color = gu.SETTINGS_PANEL_COLOR, rect = gu.SETTINGS_PANEL_RECT) # update Mr.X moves panel self.showMessage(gu.getMovesPanelMessage(self.data), self.movesPanel, bg_color = gu.MOVES_PANEL_COLOR, rect = gu.MOVES_PANEL_RECT) pygame.display.update()