From e8bf19275f9950320d6f4e7308aa2e4c4ae7888c Mon Sep 17 00:00:00 2001 From: Cara Manuela Mayer Yepez Date: Wed, 22 Mar 2023 16:34:39 +0100 Subject: [PATCH] adding peace game xoxo --- web/peace/peace.py | 170 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 web/peace/peace.py diff --git a/web/peace/peace.py b/web/peace/peace.py new file mode 100644 index 0000000..4ab69e9 --- /dev/null +++ b/web/peace/peace.py @@ -0,0 +1,170 @@ +from time import sleep +import sys + +def delayPrint(s): + for c in s: + sys.stdout.write(c) + sys.stdout.flush() + sleep(0.08) + print("\n") + sys.stdout.write(">") + return " " + +def delayPrintless(s): + for c in s: + sys.stdout.write(c) + sys.stdout.flush() + sleep(0.001) + print("\n") + sys.stdout.write(">") + return " " + +welcome_message = """ + Dear friend, + Welcome to Cardboard Lamb's Game...""" + +welcome_message2 = """ + +(( +\\``. +\_`.``-. +( `.`.` `._ + `._`-. `._ + \`--. ,' `. + `--._ `. .`. aaaa + `--.--- `. ` `. squaaaaa + `.-- `; .`._ + :- : ;. `.__,.,__ __ + `\ : ,-( ';o`>. + `-.`: ,' `._ .: (,-`, + \ ; ;. ,: + ,"`-._>-: ;,' `---.,---. + `>'" "-` ,' "":::::".. `-. + `;"'_, (\`\ _ `:::::::::::'" `---. + `-(_,' -'),)\`. _ .::::"' `----._,-"") + \_,': `.-' `-----' `--;-. `. ``.`--.____/ + `-^--' \(-. `.``-.`-=:-.__) + squaaaa ` `.`.`._`.-._`--.) + aaa `-^---^--.`-- """ + +welcome_message3 = """ + + Do you feel peaceful? If not, then grab a cup of tea. + Are you prepared to escape into your imagination? + This game works by slowing down your pace and reconnecting you to your senses. + I will give you prompts – little written daydreams to imagine yourself in. + Please only move forward when you are ready. + + If you are ready now, tell me "yes." + –––––––––––––– +""" +#----------------------------------------------------------# +### start of the game. this is a mindfulness game. ### + +print(delayPrint(welcome_message)) + +print(delayPrintless(welcome_message2)) + +print(delayPrint(welcome_message3)) + +#step one# +reply = input() +if "yes" in reply: + print(delayPrint(""" + I am so happy to hear that you are at peace. + Let's start imagining landscapes.""")) +elif "ready" in reply: + print(delayPrint(""" + I am so happy to hear that you are at peace. + Let's start imagining landscapes.""")) +else: + print(delayPrint(""" + You are not ready to play my game. + Please close your eyes and take a deep breath. + If you need some help, try searching for this URL. + https://www.youtube.com/watch?v=TTHF2Dfw1Dg. + Please listen until you are ready...""")) + +#Questions - how would i go back a step# +#can you hyperlink inside of a python code?# +#is there a way to always make it go back to step 1, like a return to homebase scenario# +#could not figure out how to add a break after else. where does it go.# + +#step two# + +print(delayPrint(""" + We are going to imagine our first daydream. + If at any point, you feel like you are ready to return back to whatever you were doing, + just type in + I am now at peace... + + If you are not ready to return, type in + Let's go... + """)) +#how do i actually make it so that if someone types peace at any point, it stops# + +#message = "What do you want to do?"# +#print(message)# +#reply = input()# + +while True: + reply = input() + if "go" in reply: + print(delayPrint(""" + You are lying down in a lavender field.""")) + + print(delayPrintless(""" + ,,, ,,, + {{{}} ,,, {{{}} ,,, + ,,, ~Y~ {{{}},,, ,,, ~Y~ {{{}},,, + {{}}} |/,,, ~Y~{{}}} {{}}} |/,,, ~Y~{{}}} + ~Y~ \|{{}}}/\|/ ~Y~ ,,, ~Y~ \|{{}}}/\|/ ~Y~ ,,, + \|/ \|/~Y~ \|,,,|/ {{}}}\|/ \|/~Y~ \|,,,|/ {{}}} + \|/ \|/\|/ \{{{}}/ ~Y~ \|/ \|/\|/ \{{{}}/ ~Y~ + \|/\\|/\|/ \\|~Y~// \|/ \|/\\|/\|/ \\|~Y~// \|/ + \|//\|/\|/,\\|/|/|// \|/ \|//\|/\|/,\\|/|/|// \|/ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^""")) + + print(delayPrint(""" + The field has not been harvested yet. + The ground is soft and warm. It has been baked by the sun.""")) + print(delayPrintless(""" + + ; : ; + . \_,!,_/ , + `.,' `.,' + / \ + ~ -- : : -- ~ + \ / + ,'`._ _.'`. + ' / `!` \ ` + : ; + + """)) + print(delayPrint(""" + You are wearing thin cotton. Can you feel the warm ground through the layer? + Can you feel the warmth of the sun on your face? + + The smell of lavender and warm soil is thick in the air. + The flowers are so full. + When you just touch them, + it feels like they burst with beads of lavender oil. + + Their nectar is sweet. + + The air is clear. + The sky is blue. + There are no clouds. + There is only sun and peace and lavender. + + + Would you like to explore another daydream?""" + )) + + elif "now" in reply: + break + elif "peace" in reply: + break + + +