repl.it
@QuinnRunnenburg/

Tamaqotchi

Python

No description

fork
loading
Files
  • main.py
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
import time as t
import replit
from termcolor import colored
notification = "Commands are: play, eat & sleep"
sleep = 25
food = 25
fun = 50
nick = input("Name your Tamaqotchi: ")
replit.clear()
replit.clear()
while True:
  print("Last notification: " + colored(notification, "red"))
  print("Slept: " + str(sleep) + "%")
  print("Ate: " + str(food) + "%")
  print("Fun: " + str(fun) + "%")
  doing = input("What do u do? ")
  if doing == "CHEAT":
    cheat = input("[CHEATMETHOD] ")
    if cheat == "ALL":
      sleep = 100
      food = 100
      fun = 100
    if cheat == "SUICIDE":
      fun = 0
    if cheat == "DEAD":
      food = 0
    if cheat == "ADD":
      cheat = input("[CHEATMETHOD]/ADD: ")
      if cheat == "FOOD":
        cheat = input("[CHEATMETHOD]/ADD/FOOD: ")
        food = int(cheat)
      if cheat == "SLEEP":
        cheat = input("[CHEATMETHOD]/ADD/SLEEP: ")
        sleep = int(cheat)
      if cheat == "FUN":
        cheat = input("[CHEATMETHOD]/ADD/FUN: ")
        fun = int(cheat)
    if cheat == "SET":
      cheat = input("[CHEATMETHOD]/SET: ")
      if cheat == "FOOD":
        cheat = input("[CHEATMETHOD]/SET/FOOD: ")
        food = int(cheat)
      if cheat == "SLEEP":
        cheat = input("[CHEATMETHOD]/SET/SLEEP: ")
        sleep = int(cheat)
      if cheat == "FUN":
        cheat = input("[CHEATMETHOD]/SET/FUN: ")
        fun = int(cheat)
      if cheat == "ALL":
        cheat = input("[CHEATMETHOD]/SET/ALL: ")
        food = int(cheat)
        sleep = int(cheat)
        fun = int(cheat)
  if doing.lower() == "sleep":
    if sleep > 80:
      notification = nick + " is not sleepy enough"
    elif sleep > 100:
      sleep = 100
    else:
      t.sleep(2)
      fun -= 10
      sleep += 20
      food -= 10
      notification = nick + " slept a bit"
  if doing.lower() == "eat":
    if food > 80:
      notification = nick + " is Not hungry enough"
    elif food > 100:
      food = 100
    else:
      fun -= 10
      food += 20
      sleep -= 10
      notification = nick + " ate a bit"
  if doing.lower() == "play":
    if fun < 100:
      t.sleep(2)
      fun += 20
      sleep -= 20
      food -= 10
      notification = nick + " played a bit"
    if fun > 100:
      fun = 100
  if food <= 0:
    replit.clear()
    print(colored(nick + " died of hunger", "red"))
    break
  if sleep < 10:
    t.sleep(1)
    sleep += 5
    food -= 5
    fun -= 30
    notification = nick + " collapsed of sleep and slept"
  if fun <= 0:
    replit.clear()
    print(colored(nick + " was depressive and killed itself", "red"))
    break
  replit.clear()
Fetching token
?