-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
41 lines (32 loc) · 966 Bytes
/
Copy pathexample.py
File metadata and controls
41 lines (32 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from pyfrotz import Frotz
from pyfrotz.parsers import advent_intro_parser, planetfall_intro_parser
import time
# load your game file
data = 'games/zork1.z5'
#data = "/home/miro/PycharmProjects/GameSkills/ovos-skill-planet-fall-game/res/planetfall.z5"
game = Frotz(data,"/usr/games/dfrotz")
# use it inside code
#game_intro = game.parse_intro()
#print(game_intro)
#description = game.do_command("north")
#print (room)
#print (description)
#time.sleep(0.5)
#des = game.restore('SAVE/zork1.qzl')
#print (des)
#time.sleep(0.5)
#description = game.do_command("restore")
#print (description)
#time.sleep(0.4)
#description = game.do_command("zorktest.qzl")
#print (description)
#time.sleep(0.4)
#description = game.do_command("north")
#print (description)
#time.sleep(0.4)
#description = game.save("SAVE/zork1.qzl")
#print (description)
#description = game.do_command("zorktest.qzl\n")
#print (description)
# or play in the cli
game.play_loop()