Skip to content

Commit

Permalink
Merge pull request #29 from pseudo-apt/ascii-art-actions
Browse files Browse the repository at this point in the history
Added ascii art for all actions
  • Loading branch information
mjip authored Oct 24, 2020
2 parents 6d9f7a9 + 1b6e7ca commit f458773
Show file tree
Hide file tree
Showing 3 changed files with 337 additions and 29 deletions.
9 changes: 5 additions & 4 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys

import internals
from internals import asciiart

from scenes import intro, gameplay, ending

Expand All @@ -16,7 +17,7 @@ def demo(screen):

quarantine_status = internals.QuarantineStatus(10, 10, [])

game_text = f"{internals.START_SCENE}"
game_text = f"{asciiart.START_SCENE}"
game_text += f"It's 8AM on day {quarantine_status.day_count} of your quarantine. You get up out of bed. What do you do?\n"
action_index = 0
options = ""
Expand Down Expand Up @@ -46,12 +47,12 @@ def demo(screen):
continue

user_choice = int(user_input)

action = action_names[user_choice]

result = quarantine_status.apply_action(action)
game_text = f"{internals.ACTIONS_ASCII_ART[action]}"

game_text = f"{result}\n\n"
result = quarantine_status.apply_action(action)
game_text += f"{result}\n\n"

game_text += (
f"It's {quarantine_status.current_time} on day {quarantine_status.day_count} of your quarantine. You're in the {quarantine_status.current_room}.\n"
Expand Down
41 changes: 16 additions & 25 deletions internals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import copy
from typing import Callable, Dict, List, Optional, Tuple

from . import asciiart


class Action:
"""
Expand Down Expand Up @@ -28,30 +30,6 @@ def _basic_apply(state: "QuarantineStatus") -> str:
self.delta_fulfillment = delta_fulfillment


START_SCENE = """
█▒▌▒░░░║█▌H░░░░»░»»░░░»░░»»░░░░░░░░░░░░░░║██▓▓░░░░»»»``;▄▄▓█████████
█▒▌▌»»░║█▌H»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»▐██▓▓░»»»▄▄▄▓███████████▀╙┴
███████████▓▓▓▓▓▓▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄L⌂;;,▐██╫▓▄▓▓████████▀▀
█▀▓▓▀▀▀███████████████████████████████████████████▀▀▀╙''`
█░╠⌡ ▐█▌⌐ `` ````````` ' `L└└└╙╙╙╙╙╙███▀▌````` `
█░╚╠ ▐█▌ ║█▌╫▌```
█╫╣╫╫╫╫▓██ ╫██▌
█╫╫╫╫╦╩▓██ ╫███
█╫╫╫╫╦╫▓██ ███▓
█╫╫╫╫Ñ╫▓█▌ ▓▓██╣╫
█▓╫╫▄▄▄▓█▌ ▓██▓╫▄▐
██████████████████████████████████▀▀▀▀▀▀▀▀▀███████▓▓▄▒N╦▄
█████████████████████████▀▀▀▀▀╬╫ÑÜ╫╫╣╫╫╫╣╫Ñ╬K╢▀▓███████▓▄▒M╦▄
████████▓███████▀▀▀▀▀▀▀▀╫╫╣╫Ñ╬K╢╫╫▓╬╫╫╫▓╫╫▓▓▓╫╣╫╫ÑÑ╬▀▀████████▓▓█▓▓▓
▀▀▀▀▀▀▓▓▀▀▀▀▀▀▀█▌╫╣▒▓▓▓▓▓▓▌╦╟▓▓▓╫╫▓▓╣▓▓▓▓╫▓╫╣╫╫╫╫╬╫N╦╬▀▓██████████▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓╫Ñ╠╫▓▓▓▓▓▌▓▓║▀▓╫╫▓╫╫╫╫▓▓▓▌╬▀▓▒▓Ñ╫╫╫╫╫Ñ░░░╠▀▀████████
▌╣▓▓▓▓████▓▓▓██████▌▓▓╫▒N╬▌▓▓▓▓▓╫▓▓█▓▄░╫▓▓▓▓▓▓╫╫╫╫▓╫╫▓▓▓▓╬╫N░▀██████
██▌╣█▓▓██████████▓█▓╫▓▓▌╫░Ñ▓▓▓▓▓▓╬▓▓▓█▓▓▓▓▓▓▓▌▓▓▓▓╫▓▓▓▌▓▌▓█▌Ñ╫▀█████
███▌╣██████▓███▓▓▓█▓█▓█▓█M╫╫▓▓▓▓▓▓▒▓█▓▓██▓▓▓▓▌▓██▓▓▓▓█▓╫▌▓██▓╫╬█████
█▓██████████████▓▓▓▓█▓████░╫▓▓▓▓▌╫▓▓▓▓█▓▓██▓▓▓▓▓▓▓▓███▓█▓▓▓██▒Ñ▓████
██████████████▓▓▓▓███████N░╚▓▓▓▓▓▓▓╫▓█████▓▓▓▓▓▓▓▓██▓███▓███▌Ñ░█████
"""

# Action names
ACTION_GET_SLOSHED = "drink_beer"
ACTION_ORDER_TAKEOUT = "eat_delivery"
Expand All @@ -67,7 +45,20 @@ def _basic_apply(state: "QuarantineStatus") -> str:
ACTION_DANCE_LIKE_NO_ONES_WATCHING = "listen_to_radio"

# ASCII art associated with each action
# ACTIONS_ASCII_ART: Dict[str, str] = {}
ACTIONS_ASCII_ART: Dict[str, str] = {
ACTION_GET_SLOSHED: asciiart.ACTION_GET_SLOSHED_SCENE,
ACTION_ORDER_TAKEOUT: asciiart.ACTION_ORDER_TAKEOUT_SCENE,
ACTION_COOK_FOOD: asciiart.ACTION_COOK_FOOD_SCENE,
ACTION_INFINITE_REDDIT: asciiart.ACTION_INFINITE_REDDIT_SCENE,
ACTION_REFRESH_INBOX: asciiart.ACTION_REFRESH_INBOX_SCENE,
ACTION_ONLINE_SHOPPING: asciiart.ACTION_ONLINE_SHOPPING_SCENE,
ACTION_NETFLIX_AND_CHILL_W_YOURSELF: asciiart.ACTION_NETFLIX_AND_CHILL_W_YOURSELF_SCENE,
ACTION_BRO_SPLIT_IT_UP: asciiart.ACTION_BRO_SPLIT_IT_UP_SCENE,
ACTION_VIDEO_CHAT_WITH_THE_FAM: asciiart.ACTION_VIDEO_CHAT_WITH_THE_FAM_SCENE,
ACTION_STARE_OUT_WINDOW: asciiart.ACTION_STARE_OUT_WINDOW_SCENE,
ACTION_COFFEEDENCE: asciiart.ACTION_COFFEEDENCE_SCENE,
ACTION_DANCE_LIKE_NO_ONES_WATCHING: asciiart.ACTION_DANCE_LIKE_NO_ONES_WATCHING_SCENE,
}

# Action properties
ACTIONS: Dict[str, Action] = {
Expand Down
Loading

0 comments on commit f458773

Please sign in to comment.