repl.it
@pieromqwerty/

Repl.it MMH

Python

My hackathon project. Lol

fork
loading
Files
  • main.py
  • changelog.txt
  • to-do.txt
main.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
#just some libraries
from os import system, name
from time import sleep
import random

def clear(): #clear function
    if name == 'nt': 
        _ = system('cls') 
    else: 
        _ = system('clear') 

day = 0
afood = 10
ahunger = 0
bfood = 10
bhunger = 0
cfood = 10
chunger = 0
dfood = 10
dhunger = 0
bangry = 0
cangry = 0
dangry = 0
pantry = 19
give = 0

def two():
    print("You decide that none of this is worth it and that stepping into the Nuclear wasteland is a good idea. Nobody stops you. You open the door, walk up the steps, then collapse and pass out.")
    print("This is definitely the end. This is the end of the game. There is definitely not a timer running down right now that will trigger anything.")
    print("(Don't worry it's only a minute)")
    sleep(60)
    print("")
    print("You wake up to a hand helping you up. You fade in and out of conciousness as your journey begins...")
    sleep(5)
    print("")
    print("Its over now")
    sleep(2)
    print("")
    print("Yes, it really is")
    sleep(2)
    print("")
    print("Why are you still here?")
    print("Go outside, enjoy the outdoors. You deserve it I think.")
    sleep(5)
    print("")
    print("The actual end, for now anyways lol")
    exit()

def kickOut():
    print("Everybody else has decided you need to leave. You open the door, walk up the steps, then collapse and pass out.")
    print("This is definitely the end. This is the end of the game. There is definitely not a timer running down right now that will trigger anything.")
    print("(Don't worry it's only a minute)")
    sleep(60)
    print("")
    print("You wake up to a hand helping you up. You fade in and out of conciousness as your journey begins...")
    sleep(5)
    print("")
    print("Its over now")
    sleep(2)
    print("")
    print("Yes, it really is")
    sleep(2)
    print("")
    print("Why are you still here?")
    print("Go outside, enjoy the outdoors. You deserve it I think.")
    sleep(5)
    print("")
    print("The actual end, for now anyways lol")
    exit()

def main():
    global day
    global afood
    global ahunger
    global bfood
    global bhunger
    global cfood
    global chunger
    global dfood
    global dhunger
    global bangry
    global cangry
    global dangry
    global pantry
    global give
    day = day + 1
    print("Day: " + str(day))
    print("")
    print("Your Stats:")
    print("   Food: " + str(afood))
    print("   Hunger: " + str(ahunger))
    print("")
    print("Summer's Stats:")
    print("   Food: " + str(bfood))
    print("   Hunger: " + str(bhunger))
    print("   Agitation: " + str(bangry))
    print("")
    print("Aaron's Stats:")
    print("   Food: " + str(cfood))
    print("   Hunger: " + str(chunger))
    print("   Agitation: " + str(cangry))
    print("")
    print("Annie's Stats:")
    print("   Food: " + str(dfood))
    print("   Hunger: " + str(dhunger))
    print("   Agitation: " + str(dangry))
    print("")
    print("There is " + str(pantry) + " food in the pantry.")
    print('''
Select your action for today:
1. Take Food from Storage
2. Take Food from another Character
3. Give Food to another Character
4. Eat some of your Food
5. Sacrifice yourself to the Nuclear Wasteland
    ''')
    curchoice = input("Select a number between 1 and 5: ")
    clear()
    curchoice = int(curchoice)
    if curchoice == 1:
        temp = input("Enter the amount of food you would like to take from the pantry: ")
        temp = int(temp)
        if temp > 5:
            kickOut()
        elif temp > pantry:
            print("Chief, thats impossible... You lost a day and everyone just got angrier...")
            bangry = bangry + 2
            cangry = cangry + 2
            dangry = dangry + 2
        else:
            print("You took " + str(temp) + " food from the pantry. Made everyone a little agitated, but it happens.")
            bangry = bangry + 1
            cangry = cangry + 1
            dangry = dangry + 1
            pantry = pantry - temp
            afood = afood + temp
    elif curchoice == 2:
        print("Taking food from another player at random...")
        character = random.randrange(1,3,1)
        if character == 1:
            print("You took food from Summer. Shes kind of mad and everyone got a bit angry at you.")
            bangry = bangry + 2
            cangry = cangry + 3
            dangry = dangry + 2
            bfood = bfood - 1
        elif character == 2:
            print("You took food from Aaron. He is kind of mad and everyone got a but angry at you.")
            bangry = bangry + 2
            cangry = cangry + 3
            dangry = dangry + 2
            cfood = cfood - 1
        else:
            print("You took food from Annie. Shes kind of mad and everyone got a bit angry at you.")
            bangry = bangry + 2
            cangry = cangry + 2
            dangry = dangry + 3
            dfood = dfood - 1
        print("You have 1 more food than before. I hope it was worth it lol.")
        afood = afood + 1
    elif curchoice == 3:
        print("Giving food from another player at random...")
        character = random.randrange(1,3,1)
        if character == 1:
            print("You gave food to Summer. Shes is happier and everyone got a bit less angry at you.")
            bangry = bangry - 2
            cangry = cangry - 3
            dangry = dangry - 2
            bfood = bfood + 1
        elif character == 2:
            print("You gave food to Aaron. He is happier and everyone got a bit less angry at you.")
            bangry = bangry - 2
            cangry = cangry - 3
            dangry = dangry - 2
            cfood = cfood + 1
        else:
            print("You gave food to Annie. Shes is happier and everyone got a bit less angry at you.")
            bangry = bangry - 2
            cangry = cangry - 2
            dangry = dangry - 3
            dfood = dfood + 1
        print("You have 1 less food than before.")
        afood = afood + 1
        give = give + 1
    elif curchoice == 4:
        if (afood > 0):
            print("You ate some of your food. It didn't affect anybody else. Good job?")
            afood = afood - 1
            ahunger = ahunger - 1
        else:
            print("You have no more food. Another day wasted broski...")
    elif curchoice == 5:
        two()
    else:
        print("Invalid entry... You lost a day and everyone just got angrier...")
    print("")
    print("Other players automatically doing tasks...")
    if (pantry > 0 and bhunger < 5):
        pantry = pantry - 1
        bfood = bfood + 1
    elif (bfood > 0):
        bfood = bfood - 1
        bhunger = bhunger - 1
    else:
        bangry = bangry + 1
    if (pantry > 0 and chunger < 5):
        pantry = pantry - 1
        cfood = cfood + 1
    elif (cfood > 0):
        cfood = cfood - 1
        chunger = chunger - 1
    else:
        cangry = cangry + 1
    if (pantry > 0 and dhunger < 5):
        pantry = pantry - 1
        dfood = dfood + 1
    elif (dfood > 0):
        dfood = dfood - 1
        dhunger = dhunger - 1
    else:
        dangry = dangry + 1
    ahunger = ahunger + 1
    bhunger = bhunger + 1
    chunger = chunger + 1
    dhunger = dhunger + 1
    print("End of day " + str(day))
    input("Press enter to move onto the next day.")
    clear()
    if (ahunger > 10):
        print("You died of starvation after " + str(day) + " days. Try again, as this is not the desired outcome...")
    avghung = bhunger + chunger + dhunger
    avghung = avghung / 3
    avgangry = bangry + cangry + dangry
    avgangry = avgangry / 3
    if (avghung > 8):
        print("Everyone got hungry and decided to eat you. You lasted " + str(day) + " days. Try again, as this is not the desired outcome...")
        exit()
    if (avgangry > 10):
        print("Everyone got annoyed by you and kicked you out...")
        kickOut()
    if (give > 4):
        print("I *warned* you that this is Cold war america... They thought you were a spy and are kicking you out...")
        kickOut()



def drawTitle():
    print('''
  _________.__                 .__                
 /   _____/|  |__ _____ _______|__| ____    ____  
 \_____  \ |  |  |\__  \|_  __ \  |/    \  / ___\ 
 /        \|   Y  \/ __ \|  | \/  |   |  \/ /_/  >
/_______  /|___|  (____  /__|  |__|___|  /\___  / 
        \/      \/     \/              \//_____/  
.__         
|__| ______ 
|  |/  ___/ 
|  |\___ \  
|__/____  > 
        \/ 
        
_________              .__                
\_   ___ \_____ _______|__| ____    ____  
/    \  \/\__  |\_  __ \  |/    \  / ___\ 
\     \____/ __ \|  | \/  |   |  \/ /_/  >
 \______  (____  /__|  |__|___|  /\___  / 
        \/     \/              \//_____/  

        ("Sharing is Caring" if you can't read Ascii Art) 
        
        A Game By @pieromqwerty and @KoalaV2 for
        the Repl.it MMH

        Press Enter to Start''')
    input()
    clear()

print("Note from the authors:")
print("")
print("Welcome to Piero and Koala Procrastinate until 4.5 hours before the hackathon ends. We had a good time making this, and have really decided that procrastination really is not a good idea. Enjoy!")
input("Press Enter to Continue")
clear()
drawTitle()
print("Sharing is Caring is a simulator dedicated to how to Share with your peers, while also taking up strategies to gain things while you are at it. Your name is Sammy, and you are an 8 year old locked in a Nuclear Shelter after the Soviets bombed the absolute hecc out of 'Merica and left the children from your family and neighbors trapped there until supplies run out, help comes, or some miracle happens where Steve Harvey saves the day with his magnificent mustache.")
print("")
print("Share too little and nobody will give you anything, causing you to starve.")
print("Share too much and you will be accused of working for the Soviets and thrown into the nuclear wasteland above.")
print("(Yes I know, you may 8, but come on, they were trying to weaponize satellites during the Cold War, who can you blame? You Sammy, you selfish child.)")
print("")
print('''Select your desired difficulty. The higher your difficulty is, the meaner the other children will be. Did I mention your only companions are the following?

1. Summer - Aged 7, Female
2. Aaron - Aged 9, Male
3. Annie - Aged 8, Female 

Dificulties:

1. Easy
2. Immediately Lose (lol)
''')
choice = int(input())
clear()
while (choice > 2):
    print("Incorrct choice, please choose a numer between 1 and 2: ")
    choice = int(input())
    clear()
print('''There are a few actions you can take with this game. They are: 
1. Take Food from Storage
2. Take Food from another Character
3. Give Food to another Character
4. Eat some of your Food
5. Sacrifice yourself to the Nuclear Wasteland
''')
print("")
print("The hunger, food, and anger of all of the characters are given at the beginning of each turn.")
input("Press Enter to Continue and Start the Game")
clear()

print('''
     _.-^^---....,,--       
 _--                  --_  
<                        >)
|                         | 
 \._                  __./  
    ```--. . , ; .--''        
          | |   |             
       .-=||  | |=-.   
       `-=#$%&%$#=-'   
          | ;  :|     
 _____.,-#%&[email protected]%#&#~,._____)''')
print("BOOOOOOOM")
print("")
print("That was the third blast you had heard in a few hours. You, Summer, and Aaron were scared. Your parents had stuck you in this bunker a few hours back for the best of your life. As Annie is just starting to wake up.")
print("You slip back to sleep, hoping that there are no more blasts...")
print("What seems like years later, you wake up to the sound of, ")
print('''"Hey, you. You're finally awake. You were trying to cross the border, right? Walked right into that Imperial ambush, same as us, and that thief over there."''')
print("Aaron was plaing some [Redacted Video Game Title because I dont want to get Sued].")
print("30 minutes pass, with you and the others discovering your surroundings. Theres a pantry with some food in it, a TV, a door to the outside, a bathroom, and 4 beds.")
print("")
print("")
print("This is it")
print("This is your life now")
print()
print("Press Enter to continue")
input()
clear()
x = 1
if choice == 2:
    two()
day = 0
globday = day
while x == 1:
    main()
    globday = day
    day = globday