예제 #1
0
 def __init__(self, map, seekerRowPos, seekerColPos, hiderList,stack):
     p.init()
     self.seekerRowPos = seekerRowPos
     self.seekerColPos = seekerColPos
     self.hiderList = hiderList
     self.gs = GameEngine.GameState(map)
     self.loadImage()
     self.stack = stack
예제 #2
0
파일: Main.py 프로젝트: FAST-PROJ/key-game
    def __init__(self):
        pygame.init()
        pygame.font.init()
        self.myFont = pygame.font.SysFont('Comic Sans MS', 15)
        self.screen = pygame.display.set_mode((const.WIDTH, const.HEIGHT))
        self.screenBoard = pygame.Surface(
            (const.WIDTH_BOARD, const.HEIGHT_BOARD))
        self.screenScore = pygame.Surface(
            (const.WIDTH_SCORE, const.HEIGHT_SCORE))

        self.screen = pygame.display.set_mode((const.WIDTH, const.HEIGHT))
        self.screen.fill(pygame.Color(const.BOARD_COLOR_WHITE))
        self.clock = pygame.time.Clock()
        self.gameState = GameEngine.GameState(pygame, self.screen,
                                              self.screenBoard,
                                              self.screenScore)
        self.squareSize = const.HEIGHT_BOARD // len(self.gameState.board)
        self.running = True
        self.squareSelected = []
        self.movementsPossibles = []