コード例 #1
0
ファイル: main.py プロジェクト: johnyu916/pacman
def main():
    """
    1.load background and foreground.
    2. start moving
    """
    graphics.run()
コード例 #2
0
def main():
    run()
コード例 #3
0
ファイル: __main__.py プロジェクト: Oneman2feet/a-sharp
        self.f.seek(offset, whence)
        return self.f.tell()


def queue(filename):
    global song_info, player, data_queue, thread_queue
    yield Song(filename)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Process a sound file.')
    parser.add_argument('filename', type=str, help='the path to the sound file')
    parser.add_argument('-d', dest='duration', type=float, help='specify the duration of the sound file to be analyzed')
    args = parser.parse_args()
    framerate = 0.1  # change this to adjust video and audio analysis fr

    data_queue = Queue()
    song_info = gather_data(args.filename)

    player = musicplayer.createPlayer()
    sphere = Sphere(100, 100)

    graphics.initialize(player, sphere, **song_info)
    graphics.setup()

    raw_input("Analysis complete. Press Enter to continue...\n")

    player.queue = queue(args.filename)
    player.playing = True
    graphics.run()
コード例 #4
0
ファイル: main_game.py プロジェクト: astefek/Escape-Room-Game
import sudoku.puzzle
import maze.mazePuzz
import shape_puzzle
import outro

pygame.init()
pygame.font.init()

# Window/background details
window_width = 720
window_height = 480
window = pygame.display.set_mode([window_width, window_height])

startbg = pygame.image.load('introbg.png').convert()

bg = pygame.image.load('mainbg.png').convert()

# Mouse/Cursor
pygame.mouse.set_cursor(*pygame.cursors.arrow)

# Progress variable
puzzles_solved = 0

while True:
    # Start Screen
    game_loop = intro.run(window, startbg)
    if game_loop == 1:
        game_loop = graphics.run(window, bg)
    if game_loop == 2:
        outro.run(window, startbg)
コード例 #5
0
import graphics
from logic.board import Board

if __name__ == "__main__":
    board = Board()
    graphics.run(board)