-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.py
407 lines (292 loc) · 9.34 KB
/
interfaces.py
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# interfaces.py
from abc import ABC, abstractmethod
class IGameManager:
def start_new_game(self, player_name):
"""Start a new game with the given player name."""
pass
def get_inventory_data(self):
"""Return inventory data."""
pass
def get_fast_travel_locations_data(self):
"""Return fast travel locations data."""
pass
def get_notes_data(self):
"""Return notes data."""
pass
def get_quests_data(self):
"""Return quests data."""
pass
def get_emails_data(self):
"""Return emails data."""
pass
def load_global_inventory(self):
"""Load global inventory."""
pass
def load_worlds_data(self):
"""Load worlds data."""
pass
def load_notes(self):
"""Load notes."""
pass
def load_emails(self):
"""Load emails."""
pass
def populate_initial_game_state(self):
"""Populate initial game state."""
pass
def update_quests_ui(self):
"""Update quests UI."""
pass
def get_inventory_items(self):
"""Get inventory items."""
pass
def get_fast_travel_locations(self):
"""Get fast travel locations."""
pass
def get_player_notes(self):
"""Get player notes."""
pass
def get_player_quests(self):
"""Get player quests."""
pass
def get_player_emails(self):
"""Get player emails."""
pass
def get_player_email_details(self, email_name):
"""Get details of a specific email."""
pass
def get_inventory_item_details(self, item_name):
"""Get details of a specific inventory item."""
pass
def get_fast_travel_location_details(self, location_name):
"""Get details of a specific fast travel location."""
pass
def get_note_details(self, note_name):
"""Get details of a specific note."""
pass
def get_quest_details(self, quest_name):
"""Get details of a specific quest."""
pass
def mark_email_as_read(self, email_name):
"""Mark an email as read."""
pass
def save_game(self):
"""Save the game state."""
pass
def load_game(self, filename):
"""Load a game state from a file."""
pass
def update_location(self, new_location):
"""Update the player's location."""
pass
class IQuestTracker(ABC):
@abstractmethod
def load_initial_quests(self):
"""Load the initial quests."""
pass
@abstractmethod
def get_quest(self, quest_name):
"""Get a specific quest by name."""
pass
@abstractmethod
def activate_quest(self, quest_name):
"""Activate a quest by name."""
pass
@abstractmethod
def initialize_quest(self, quest_slug, quest_data):
"""Initialize a quest given its slug and data."""
pass
@abstractmethod
def quest_class_for_slug(self, quest_slug):
"""Get the quest class for a given slug."""
pass
@abstractmethod
def check_all_quests(self):
"""Check the status of all quests."""
pass
class IGameUI:
def on_game_loaded(self):
"""Handle the event when the game is loaded."""
pass
def update_ui(self):
"""Update the entire UI."""
pass
def update_ui_from_dropdown(self, index):
"""Update the UI based on a selection from a dropdown menu."""
pass
def populate_inventory(self):
"""Populate the inventory in the UI."""
pass
def populate_fast_travel_locations(self):
"""Populate the fast travel locations in the UI."""
pass
def populate_notes(self):
"""Populate the notes section in the UI."""
pass
def populate_quest_log(self):
"""Populate the quest log in the UI."""
pass
def populate_emails(self):
"""Populate the emails section in the UI."""
pass
def process_command(self):
"""Process a command entered by the user."""
pass
def display_item_information(self, item_widget):
"""Display information about an item selected in the UI."""
pass
def display_text(self, html_content):
"""Display text in the main text area of the UI."""
pass
def update_quest_log(self):
"""Update the quest log in the UI."""
pass
def update_scene_display(self):
"""Update the scene display in the UI."""
pass
class IPlayerSheet(ABC):
@abstractmethod
def add_item(self, item):
"""Add an item to the player's inventory."""
pass
@abstractmethod
def remove_item(self, item_name):
"""Remove an item from the player's inventory by its name."""
pass
@abstractmethod
def add_fast_travel_location(self, location, world_name=None):
"""Add a new fast travel location."""
pass
@abstractmethod
def remove_fast_travel_location(self, location_name):
"""Remove a fast travel location."""
pass
@abstractmethod
def add_note(self, note):
"""Add a note to the player's collection."""
pass
@abstractmethod
def remove_note(self, note_name):
"""Remove a note from the player's collection."""
pass
@abstractmethod
def add_quest(self, quest):
"""Add a quest to the player's quest log."""
pass
@abstractmethod
def update_quest(self, updated_quest):
"""Update a quest in the player's quest log."""
pass
@abstractmethod
def complete_quest(self, quest_name, quest_tracker):
"""Mark a quest as completed."""
pass
@abstractmethod
def add_email(self, email):
"""Add an email to the player's inbox."""
pass
@abstractmethod
def remove_email(self, email_name):
"""Remove an email from the player's inbox."""
pass
@abstractmethod
def get_email(self, email_name):
"""Retrieve details of a specific email."""
pass
@abstractmethod
def get_all_emails(self):
"""Retrieve all emails from the player's inbox."""
pass
@abstractmethod
def get_fast_travel_worlds(self):
"""Return a list of unique world names from the fast travel locations."""
pass
class IWorldBuilder():
def incoming_command(self, command):
"""Process an incoming command from the player."""
pass
def fast_travel_to_world(self, world_name):
"""Handle fast travel to a specified world."""
pass
def find_location_data(self, location_name):
"""Find and return data for a specified location."""
pass
def talk_to_npc(self, npc_name):
"""Handle interactions with a non-player character (NPC)."""
pass
def interact_with(self, interactable_name):
"""Handle interactions with an object in the game world."""
pass
def where_am_i(self):
"""Provide information about the player's current location."""
pass
def look_around(self):
"""Describe the player's current surroundings."""
pass
def open_container(self, container_name):
"""Open a container in the game world."""
pass
def move_player(self, location_name):
"""Move the player to a different location."""
pass
def examine_item(self, item_name):
"""Examine an item in the player's vicinity or inventory."""
pass
def give_item(self, item_name, quantity):
"""Give an item from the player's inventory to an NPC or container."""
pass
def update_world_data(self, location_name, update_dict=None, new_world_name=None):
"""Update the game world's data."""
pass
def build_scene_text(self):
"""Build and return a descriptive text of the current scene."""
pass
class IMainWindow(ABC):
@abstractmethod
def set_dark_theme(self):
"""Set the dark theme for the main window."""
pass
@abstractmethod
def init_entry_point(self):
"""Initialize the entry point of the application."""
pass
@abstractmethod
def on_intro_animation_complete(self):
"""Handle the completion of the intro animation."""
pass
@abstractmethod
def init_splash_screen(self):
"""Initialize the splash screen of the application."""
pass
@abstractmethod
def init_menu_bar(self):
"""Initialize the menu bar of the main window."""
pass
@abstractmethod
def init_game_interface(self):
"""Initialize the main game interface."""
pass
@abstractmethod
def create_ascii_banner(self, text):
"""Create an ASCII banner for display."""
pass
@abstractmethod
def start_game(self, event):
"""Start the game, usually triggered by an event."""
pass
@abstractmethod
def change_to_game_ui(self):
"""Change the current UI to the game UI."""
pass
@abstractmethod
def trigger_save_game(self):
"""Trigger a save game action."""
pass
@abstractmethod
def select_save_file(self):
"""Select a save file for loading a game."""
pass
@abstractmethod
def prompt_for_player_name(self):
"""Prompt the user to enter their player name."""
pass