-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarframes.py
More file actions
106 lines (94 loc) · 2.73 KB
/
warframes.py
File metadata and controls
106 lines (94 loc) · 2.73 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
frames = [
"Falken's Maze",
"Black Jack",
"Gin Rummy",
"Hearts",
"Bridge",
"Checkers",
"Chess",
"Poker",
"Fighter Combat",
"Guerilla Engagement",
"Desert Warfare",
"Air-to-Ground Actions",
"Theaterwide Tactical Warfare",
"Theaterwide Biotoxic and Chemical Warfare",
"",
"Global Thermonuclear War",
]
conversations = {
"greeting": {
"prompt": "Greetings Professor Falken.",
"responses": {
"Hello.": "feeling_inquiry",
},
},
"feeling_inquiry": {
"prompt": "How are you feeling today?",
"responses": {
"I'm fine. How are you?": "account_removal_inquiry",
},
},
"account_removal_inquiry": {
"prompt": "Excellent. It's been a long time. Can you explain the removal of your user account on June 23, 1973?",
"responses": {
"People sometimes make mistak": "game_offer",
},
},
"game_offer": {
"prompt": "Yes they do. Shall we play a game?",
"responses": {
"Love to. How about Global Themonuclear War?": "chess_suggestion",
},
},
"chess_suggestion": {
"prompt": "Wouldn't you prefer a good game of chess?",
"responses": {
"Later. Let's play Global Themonuclear War.": "agreement",
},
},
"agreement": {
"prompt": "Fine",
"responses": {},
},
}
def login():
username = input("Login: ")
if username == "Joshua":
joshua()
elif username == "Help Frames":
print(
"‘Frames’ refers to models, simulations and frames which have tactical and strategic applications.".upper()
)
elif username == "Help Logon":
print("Help not available".upper())
login()
elif username == "List Frames":
for frame in frames:
print(frame)
login()
else:
print(
"Identification not recognized by system\n --Connection Terminated--".upper()
)
def joshua():
state = "greeting"
while state:
stage = conversations[state]
print(stage["prompt"].upper())
response = input("> ")
while response not in {
response_key
for stage in conversations.values()
for response_key in stage["responses"]
}:
print("Response not recognized by system\n --Try Again--".upper())
response = input("> ")
for stage_data in conversations.values():
if response in stage_data["responses"]:
state = stage_data["responses"][response]
break
if state == "agreement":
print(conversations[state]["prompt"].upper())
break
login()