-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (25 loc) · 1.03 KB
/
main.py
File metadata and controls
27 lines (25 loc) · 1.03 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
import functions as fnc
import game_map as m
def main():
# Creates Game List
game_list = m.Gamelist()
game_list.generate_list()
map_opt = game_list.name_list()
current_game = m.make_main_menu(map_opt)
cur_position = current_game['title_screen']
while True:
# this will update the position of the player and show the prompt for that area.
# This function grabs the location name, location text, and the location options
new_loc = fnc.prompt(cur_position["loc_name"], cur_position["loc_text"], cur_position["loc_opt"])
match new_loc:
case str():
cur_position = current_game[new_loc]
case m.SwitchGame():
# Debug Shows New Game Based on selection
# print(new_loc.new_game)
current_game = game_list.get_map(new_loc.new_game)
# Debug Shows Current Game File
# print(current_game)
cur_position = current_game['title_screen']
if __name__ == '__main__':
main()