예제 #1
0
파일: play.py 프로젝트: neb330/assignment5
def resume(savefile, quiet=False):
    global _game

    from game import Game
    from prompt import install_words

    _game = Game.resume(savefile)
    install_words(_game)
    if not quiet:
        print('GAME RESTORED\n')
예제 #2
0
파일: play.py 프로젝트: rjw366/assignment5
def resume(savefile, quiet=False):
    global _game

    from game import Game
    from prompt import install_words

    _game = Game.resume(savefile)
    install_words(_game)
    if not quiet:
        print('GAME RESTORED\n')
예제 #3
0
파일: play.py 프로젝트: neb330/assignment5
def play(seed=None):
    """Turn the Python prompt into an Adventure game.

    With optional the `seed` argument the caller can supply an integer
    to start the Python random number generator at a known state.

    """
    global _game

    from game import Game
    from prompt import install_words

    _game = Game(seed)
    load_advent_dat(_game)
    install_words(_game)
    _game.start()
    print(_game.output[:-1])
예제 #4
0
파일: play.py 프로젝트: rjw366/assignment5
def play(seed=None):
    """Turn the Python prompt into an Adventure game.

    With optional the `seed` argument the caller can supply an integer
    to start the Python random number generator at a known state.

    """
    global _game

    from game import Game
    from prompt import install_words

    _game = Game(seed)
    load_advent_dat(_game)
    install_words(_game)
    _game.start()
    print(_game.output[:-1])