@m314n13/

Oregon trail #2

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
import random 
food = 500
health = 5
miles_to_go = 2,000
current_month = "march"

# def game_on():
#   return health > 0 and food > 0
match = 1
while match <= 6 :
  print("You are NYC, it is March 1st. Your mission is to get to Oregon by December 31st. With 2,000 miles to go. Packed only with 500lbs of food, and 5 health. You will be able to chose between: travel, rest, hunt, status, help, and quit.")
  user = input("What is your name? ")
  commands = input("Choose between: travel, rest, hunt, status, help, and quit.")
  if commands == "travel" :
    print("You have chosen travel...You are now traveling.")
    days = random.randint(3,7)
    distance_traveled = random.randint(30,60)
    food = food - 5 
    health = health - random.randint(1,2)
    TGREEN =  '\033[32m' # Green Text
    print (TGREEN + user + " has traveled " + str(distance_traveled) + " miles and " + str(days) + " days .")
    # def add_day():  
    #   print(days + resting_days)
    # add_day()
    # print(add_day)
  if commands == "rest" :
    resting_days = random.randint(2,5)
    print("You have chosen rest...You are now resting.")
    print(user + " has rested " + str(resting_days) + " days.")
  if commands == "hunt":
    print("You have chosen hunt...You are now hunting.")
    food = food + 100
    print("You have " + str(food) + " lbs of food.")
  if commands == "status" :
    print("You have chosen status...Your status will com up soon.")
    print("You have "+ str(food) + " lbs of food,  " + str(health) + " health and the month you are on is " + current_month )
  if commands == "help" :
    print("Your mission is to get to Oregon by December 31st. With 2,000 miles to go. Packed only with 500lbs of food, and 5 health. You will be able to chose between: travel, rest, hunt, status, help, and quit.")
  if commands == "quit" :
    print("You have chosen quit...Goodbye sore loser.")
  match = match + 1



# def add_day():  
#   if commands == "travel" and days >= 3 or days == 5 or commands == "rest" and days_for_rest >=2 or days_for_rest == 7 :
#     print(days + days_for_rest)
# add_day()
# print(add_day)








#   health = health(random.randint(1 , 30) <= 2)
# def add_day():  
#   print(days)
#   if days == 5 :
#     print("hahaha")
#   else:
#     print("nu!")