repl.it
@hjvijchhgjvyjnv/

Oregon Trail Game

Python

This is a work in progress. It is a rework of "Oregon Trail" developed by Don Rawitsch Bill Heinemann and Paul Dillenberger and MECC, 1971.

fork
loading
Files
  • main.py
  • 0.1.0.py
  • 0.1.1.py
  • Changelog.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
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# Most Recent Update: Mar 19, 2019
# Current version number = 0.1.2
# Open Files tab for Changelog.

# Welcome to the Behind-The-Scenes for my Oregon Trail. 
# This is based off of Oregon Trail developed by Don Rawitsch, Bill Heinemann, Paul Dillenberger, and MECC in 1971 
# This project mostly started on Mar 11, 2019.

# Press the (-) to the left of the "if 1 == 1:" statements to minimize folders to increase readability.1

# Enjoy!1



# The "Jamestest" response is only for faster testing; do not use it1
 if you do not want your game to be messed up.

from colorama import Fore , Back , Style
from replit import clear
from time import sleep
import sys
from random import random



clear()
print(Fore.RED + "Loading, Please Wait..." + Fore.WHITE)

# Variables

z = 0 
currentCity = 1
#(Z should be used for loops)
bg = 0
x = ""
nextTownName = "Fort Kearny"
distanceToTown = 712
totalDistance = 0


# For rationing, 0 is heavy rations, 1 is slight rationing, and so on to 4 being large meals 

rationing = 2


# Dictionaries and that kind of stuff folder:

if 1 == 1:
  day = 1
  month = 1 
  year = 1838 
  temperature = 0 
  season = "Winter" 
  weather = "Sunny"


  inv = {
    "Money" : 0,
    "Wagon Repairs" : 0,
    "Clothes" : 5,
    "Oxen" : 0 ,
    "Food" : 0 ,
    "Bullets" : 0
  }

  "characters"

  characters = ["Name0" , "Name1" , "Name2" , "Name3" , "Name4"]

  characterStatus = {
    "0" : 0 ,
    "1" : 0,
    "2" : 0,
    "3" : 0,
    "4" : 0
  }

  statusList = {
    "0" : "Healthy",
    "1" : "Sick",
    "2" : "Very Sick",
    "3" : "Dead"
  }

  graveyard = []


# Functions folder:

if 1 == 1:
  def loopUnilLandmark(name , distance):
    confirmation = False
    while confirmation == False:
      confirmation = advanceTravel(distance)
      if confirmation == False:
        openChoiceDay("")
      else:
        print("Congratulations! You have arrived at " + name + ". You decided to stop here for the day.")  



  def rollForInconvenience():
    seed = randomNumber(0, 100)
    victimSeed = randomNumber(1 , len(characters))
    print("")
    
    for a in characterStatus:
      if characterStatus.get(a) >= 3:
        graveyard.append(characters[int(a)])  
        characters.pop((int(a)))
        print(victimSeed - 1)
        print (graveyard[(len(graveyard) - 1 )].__str__() + " has died!")
    if len(characters) > 0:
      if rationing == 0:
        if seed <= 10:
          return ""
        elif 60 > seed > 10:
          characterStatus[(victimSeed - 1).__str__()] += 1
          return characters[victimSeed - 1] + "\'s condition has worsened!"
        elif seed >= 60:
          graveyard.append(characters[victimSeed - 1])
          characterStatus[(victimSeed - 1).__str__()] = 3
          characters.pop((victimSeed - 1)) 
          print(victimSeed - 1)
          return graveyard[(len(graveyard) - 1)] + " has died!"
      elif rationing == 1:
        if seed <= 50:
          return ""
        elif 90 > seed > 50:
          characterStatus[(victimSeed - 1).__str__()] += 1
          return characters[victimSeed - 1] + "\'s condition has worsened!"
        elif seed >= 90:
          graveyard.append(characters[victimSeed - 1])
          characterStatus[(victimSeed - 1).__str__()] = 3
          characters.pop((victimSeed - 1)) 
          print(victimSeed - 1)
          return graveyard[(len(graveyard) - 1)] + " has died!"
      elif rationing == 2:
        if seed <= 80:
          return ""
        elif 95 > seed > 80:
          characterStatus[(victimSeed - 1).__str__()] += 1
          return characters[victimSeed - 1] + "\'s condition has worsened!"
        elif seed >= 95:
          graveyard.append(characters[victimSeed - 1])
          characterStatus[(victimSeed - 1).__str__()] = 3    
          characters.pop((victimSeed - 1)) 
          print(victimSeed - 1)
          return graveyard[(len(graveyard) - 1)] + " has died!"
      elif rationing == 3:
        if seed <= 90:
          return ""
        elif seed > 90:
          characterStatus[(victimSeed - 1).__str__()] += 1
          return characters[victimSeed - 1] + "\'s condition has worsened!"
    else:
      slowPrint("Everyone has died. Game over!")
      slowPrint("You have travelled " + totalDistance.__str__() + " miles.")
      slowPrint("Press enter to accept your fate...")
      input()
      
      while 1==1:
        clear()
        print("End of line")
        sleep(3)




  def openChoiceDay(customEvent):
    global rationing
    if rationing == 0:
      inv["Food"] -= (1 * len(characters))
    elif rationing == 1:
      inv["Food"] -= (2 * len(characters))
    elif rationing == 2:
      inv["Food"] -= (5 * len(characters))
    elif rationing == 3:
      inv["Food"] -= (8 * len(characters))
    oofs = rollForInconvenience()
    while 1 == 1 :
      printMoney()
      printDayStats()
      
      print("People that exist:")
      print("")
      print(oofs)
      for a in characters:
        print(Style.BRIGHT + (a) +  " - " + statusList[characterStatus[characters.index(a).__str__()].__str__()].__str__() + Style.NORMAL)


      print("")
      
      print("You may:")
      print("")
      print(Style.BRIGHT + "       1: Continue (return key)" + Style.NORMAL)
      print("       2: Check Stocks")
      print("       3: Go hunting")
      print("       4: Change rationing/speed")
      print("       5: Rest for the day")
      answer = input(">")
      if (answer != "1") and (answer != ' ') and (len(answer) != 0):
        if answer == "2":
          clear()
          printMoney()
          printDayStats()
          print("")
          print("Your current stocks:")
          printInventory()
          print("")
          print("Press enter to continue")
          input()
        elif answer == "3":
          print("Not implimented yet... sorry... here's 50 food for 10 bullets")
          if inv["Bullets"] > 10:
            inv["Bullets"] = inv["Bullets"] - 10
            inv["Food"] = inv["Food"] + 50
          elif inv["Bullets"] > 0:
            inv["Food"] = inv["Bullets"] * 5
            inv["Bullets"] = 0
          else: 
            print("You don't have enough bullets!")
          print("Press enter to continue")
          input()
        elif answer == "4":
          clear()
          print("       1: Heavy rationing (1 food per person)")
          print("       2: Light rationing (2 food per person)")
          print("       3: Normal rationing(5 food per person)")
          print("       4: Feasting (8 food per person)")
          print(" Currently, the rationing level is set on " + (rationing + 1).__str__())
          x = input(">")
          "Fix this loop. Probably doesn't work, but test anyway" 
          while 1 == 1:
            if x == "1":
              rationing = 0
              break
            elif x == "2":
              rationing = 1
              break
            elif x == "3":
              rationing = 2
              break
            elif x == "4":
              rationing = 3
              break
            else:
              print("Please answer with an answer choice.")
              x = input(">")
          print("Press enter to continue")
          input()
        elif answer == "5":
          advanceDay()
          changeDayColour()
          break
        else:
          print("Please answer with an answer choice.")
          sleep(2)
      elif (answer == "1") or (answer == ' ') or (len(answer) == 0):
        advanceDay()
        getRandomStats()
        print("Press enter to continue")
        input()
        changeDayColour()
        break

  def advanceTravel(startDistanceToTown):
    global nextTownName
    global distance
    global distanceToTown
    global totalDistance
    distance = randomNumber(12 , 62)
    distanceToTown -= distance
    totalDistance += distance
    # Add: Injuries affect distance
    print(Style.BRIGHT + ("-----" * 5) + Style.NORMAL)
    print("You travelled " + distance.__str__() + " miles.")
    if distanceToTown > 0:
      if distanceToTown == 1: 
        print("The nearest landmark is " + distanceToTown.__str__() + " mile away")
      else:
        print("The nearest landmark is " + distanceToTown.__str__() + " miles away.")
      return False
    else:
      print("You have arrived at " + nextTownName + ". Welcome.")
      return True

  def changeDayColour():
    if weather == "Snow":
      print(Back.WHITE + Fore.BLUE + "")      
    elif weather == "Clear":
      if season == "Winter":
        print(Back.LIGHTBLUE_EX + Fore.WHITE + "")
      elif season == "Fall":
        print(Back.YELLOW + Fore.GREEN + "")
      elif season == "Summer":
        print(Back.LIGHTYELLOW_EX + Fore.RED + "")
      elif season == "Spring":
        print(Back.CYAN + Fore.GREEN + "")
    elif weather == "Rain":
      print(Back.BLUE + Fore.YELLOW + "")
    elif weather == "Cloudy":
      print(Back.LIGHTBLACK_EX + Fore.LIGHTBLUE_EX)
    clear()

  def printInventory():
    print("You currently have:")
    print("Oxen: " + inv["Oxen"].__str__())
    print("Wagon Reapirs: " + inv["Wagon Repairs"].__str__())
    print("Clothes: " + inv["Clothes"].__str__())
    print("Bullets: " + inv["Bullets"].__str__())
    print("Food: " + inv["Food"].__str__())

  def advanceDay():
    global day
    global month 
    global season 
    global temperature 
    global year
    if (month == 1 or 2 or 5 or 7 or 8 or 10 or 12) and day == 31:
      day = 1
      month +=  1 
    elif month == 2 and day == 28:
      day = 1
      month += 1
    elif (month == 4 or 6 or 9 or 11) and day == 30:
      day = 1
      month += 1  
    elif month == 12 and day == 31:
      day = 1
      year += 1
      month = 1 
    else:
      day += 1
    if day == 20 and month == 3:
      season = "Spring"
    elif day == 21 and month == 6:
      season = "Summer"
    elif day == 23 and month == 9:
      season = "Fall"
    elif day == 21 and month == 12:
      season = "Winter"
    
    
  def randomNumber(minimum , maximum):
    maximum += 1
    if minimum < 0:
      return ( (int(random()) * (maximum-minimum) + minimum))
    elif minimum >= 0:
      return (int(random() * (maximum - minimum) + minimum))

  def getRandomStats():
    global day
    global month
    global season
    global temperature
    global weather
    weatherSeed = randomNumber(0, 100)
    
    if season == "Spring":
      temperature = randomNumber(25 , 50)
      if weatherSeed <= 15:
        weather = "Snow"
      elif 80 > weatherSeed > 15:
        weather = "Rain"
      elif weatherSeed >= 80:
        weather = "Clear"

    elif season == "Summer":
      temperature = randomNumber(50 , 80)
      if weatherSeed <= 50:
        weather = "Clear"
      elif 85 >= weatherSeed >= 50:
        weather = "Cloudy"
      elif weatherSeed > 85:
        weather = "Rain"
      
    elif season == "Fall":
      temperature = randomNumber(40 , 60)
      if int(weatherSeed) == 20:
        weather = "Thunder"
      elif weatherSeed < 20:
        weather = "Rain"
      elif 70 > weatherSeed > 20:
        weather = "Cloudy"
      elif weatherSeed >= 70:
        weather = "Clear"
      
    elif season == "Winter":
      temperature = randomNumber(15 , 35)
      if int(weatherSeed) == 30:
        weather = "Rain"
      elif weatherSeed < 30:
        weather = "Snow"
      elif 80 > weatherSeed > 30:
        weather = "Cloudy"
      elif weatherSeed >= 80:
        weather = "Clear"

    if weather == "Snow":
      temperature = randomNumber(- 0 , 30)

  def printDayStats():
    print(Style.BRIGHT + day.__str__() + " " + month.__str__() + " " + year.__str__() + ".")
    print("The temperature is " + temperature.__str__() + "°F, and the current season is " + season)
    print("The weather is currently: " + weather.__str__())
    print(Style.DIM + "")

  def printMoney():
    print(Style.BRIGHT + " " * 10 + "Money: $" +inv["Money"].__str__() + Style.NORMAL)
    print("")

  def openNumberCheck():
    x = input(">")
    y = False
    while y == False:
      try:
        x = int(x)
        y = True
      except:
        slowPrintCustom("       Input whole numbers only, please." , 0.01)
        y = False
        x = input(">")
      else:
        print("")
    return int(x)

  def slowPrintCustom(text , timeBetweenLetters):
      for c in text:
          sys.stdout.write(c)
          sys.stdout.flush()
          sleep(timeBetweenLetters)
      print("")

  def slowPrint(text):
      for c in text:
          sys.stdout.write(c)
          sys.stdout.flush()
          sleep(0.1)
      print("")

  def openChoiceCheck(answer1, answer2, answer3 , answer4):
    confirmation = False
    answer = ""
    print("1: "+ answer1)
    print("2: "+ answer2)
    print("3: "+ answer3)
    if answer4 != "":
      print("4: "+ answer4)
    sleep(1)
    answer = input(">")
    sleep(1)
    print("")
    while confirmation == False:
      if ((answer != "1") and (answer != "2") and (answer != "3")) and ((answer != "4") and (answer4 != "")):
        if answer.lower() == "answer choice" or answer.lower() == "an answer choice" or answer.lower() == "an answer choice:":
          print ("Nice try, but please answer with a real answer choice")
        elif answer.lower() == "a real answer choice" or answer.lower() == "real answer choice":
          print("Really now, answer with one of the answer choices from above.")
        else:
          print("Please answer with an answer choice (1, 2 or 3).")
        sleep(1)
        confirmation = False
        answer = input(">")
      else:
        confirmation = True
    print("You chose option " + answer)
    if answer == "1":
      return 1
    elif answer == "2":
      return 2
    elif answer == "3":
      return 3
    elif answer == "4":
      return 4
    else:
      NameError

  def storeProcess():
    startingMoney = inv["Money"]
    print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
    clear()
    printMoney()
    slowPrintCustom("Here is your caravan's inventory:" , 0.01)
    printInventory()
    sleep(5)
    print(Back.GREEN + Fore.BLUE +  "")
    clear()
    printMoney()
    slowPrintCustom("       You need oxen to move your caravan. How many Oxen do you want to buy for your caravan?" , 0.01)
    slowPrintCustom("       Oxen are $40 each. Please put whole numbers only." , 0.01)
    slowPrintCustom("       You currently have " + inv["Oxen"].__str__() + " oxen, and can only have 4." , 0.01)
    x = openNumberCheck()
    if (x * 40) > inv["Money"]:
      while x > inv["Money"]:
        print("You don't have enough money for that!")
        x=openNumberCheck()
    if inv["Oxen"] < 4 or (x > (4 - inv["Oxen"])):
      while int(x) > 4 or int(x) < 1:
        if int(x > 4):
          print("You can't fit more than 4 oxen on your wagon!")
          x = openNumberCheck()
        elif int(x - (x % 40)  ) < 40 and (inv["Oxen"] == 0):
          print("Oxen are expensive! One ox isn't enough to pull your wagon.")
          x = openNumberCheck()
    elif (4 > inv["Oxen"] > 0) :
      while int(x) > 4 - inv["Oxen"]:
        print("You can't fit more than 4 oxen on your wagon!")
        print("You have " + inv["Oxen"].__str__() + " Oxen.")
        x = openNumberCheck()
    print("You input " + int(x).__str__())

    inv["Oxen"] += int(x)

    inv["Money"] -= int(x) * 40
    sleep(2)
    print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
    clear()
    printMoney()
    slowPrintCustom("         You\'ll need warm clothes for your people. Each person already has clothes, but I reccomend that you buy an extra pair for each person." , 0.01)
    print("You have " + inv["Clothes"].__str__() + " Sets of clothes for everyone.")
    print("Clothes for each person cost 5 dollars, how many sets of clothes do you want to buy?")
    x = openNumberCheck()
    confirmation = False
    if inv["Clothes"] == 0:
      while x < 5 or (x > int(inv["Money"])):
        if x < 5 and inv["Clothes"] == 0:
          print("Are you sure you don\'t want to buy clothes for your people?")
          
          confirmation = openNumberCheck()
          if confirmation == 1:
            break
        elif x * 5 > int(inv["Money"]):
          print("You don\'t have enough money for that!")
          x = openNumberCheck()
        else:
          break

    print("You input " + int(x).__str__())
    inv["Clothes"] += x
    inv["Money"] += x * 5
    print("You now have " + int(inv["Clothes"]).__str__() + " sets of clothes for everyone...")
    sleep(2)
    print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
    clear()

    printMoney()

    slowPrintCustom("          Your wagon may take damage while travelling on the trail. I reccomend that you buy something to repair it if it does." , 0.01)  
    slowPrintCustom("          You currently have " + inv["Wagon Repairs"].__str__() + " Wagon Repairs." , 0.01)
    slowPrintCustom("          Wagon Repairs are $20 each. How many would you like to buy?" , 0.01)
    x = openNumberCheck()
    confirmation = False

    while x * 20 > int(inv["Money"]) or x < 1:
        if x < 1 and inv["Wagon Repairs"] == 0:
          print("   Are you sure you don\'t want to buy wagon repairs? You don\'t have any, and if your wagon breaks you will be stranded!")
          print("         1: Yes")
          print("         2: No")
          confirmation = openNumberCheck()
          
          if (int(confirmation)) == 1:
            break
          else:
              slowPrintCustom("          How many wagon repairs would you like to buy??" , 0.01)
              slowPrintCustom("          Wagon Repairs are $20 each." , 0.01)
              slowPrintCustom("          You currently have " + inv["Wagon Repairs"].__str__() + " Wagon Repairs right now." , 0.01)
              x = openNumberCheck()      
        elif x > int(inv["Money"]):
          print("You don\'t have enough money for that!")
          x = openNumberCheck()
        else:
          break
    print("You input " + x.__str__())
    sleep(2)
    print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
    clear()
    
    # This is Bullets.

    
    while 1 == 1:
      print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
      clear()
      printMoney()
      slowPrintCustom("         You probably will run out of food on the trail, so you may want to buy some bullets to hunt with. I reccomend you buy 50 bullets." , 0.01)    
      print("You have " + inv["Bullets"].__str__() + " Bullets.")
      print("One box of 50 bullets cost 5 dollars. How many boxes of bullets do you want to buy?")
      x = openNumberCheck()
      if x < 1 or (x * 5 > int(inv["Money"])) and confirmation == False:
        if x < 1 and inv["Bullets"] == 0:
          print("Are you sure you don\'t want to buy bullets for your people? You won\'t be able to hunt!")
          print("       1: Yes")
          print("       2: No")
          confirmation = openNumberCheck()
          if confirmation == 1:
            break
        elif x * 5 > int(inv["Money"]):
          print("You don\'t have enough money for that!")
          sleep(4)
      else:
        break
    print("You input " + int(x).__str__())

    inv["Bullets"] += x * 50  
    inv["Money"] -= x * 5
    print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
    clear()
    sleep(2)
    printMoney()
    # This is food
    while 1 == 1:
      print(Back.GREEN + Fore.LIGHTBLUE_EX +  "")
      clear()
      printMoney()
      slowPrintCustom("         How many containers of food (10 pounds) do you want to buy?" , 0.01)    
      print("         You have " + inv["Food"].__str__() + " units of Food.")
      slowPrintCustom("          One container (10 pounds) of food costs $" +  (currentCity * 2 ).__str__() + " in this city. How many containers of food would you like to buy?" , 0.01)
      x = openNumberCheck()
      if x < 1 or (x > int(inv["Money"])):
        if x < 1 and inv["Food"] == 0:
          print("Are you sure you don\'t want to buy Food? You can still hunt for food with bullets")
          print("       1: Yes")
          print("       2: No")
          confirmation = openNumberCheck()
          if confirmation == 1:
            break 
        elif x * (currentCity * 2) > int(inv["Money"]):
          print("You don\'t have enough money for that!")
          x = openNumberCheck()
      else:
        break
    print("You input " + int(x).__str__())
    inv["Food"] += x * 10
    inv["Money"] -= x * (currentCity * 2)


    sleep(2)

    
    print(Back.MAGENTA + Fore.LIGHTGREEN_EX + "")
    clear()
    slowPrint("You spent " + (startingMoney - inv["Money"]).__str__() + " in the store.")
    slowPrint("Here is your current inventory:")
    printInventory()
    sleep(2)
    print("")
    print("Press enter to continue...")
    input()
    print(Back.CYAN + Fore.BLACK + "")
    clear()

clear()
print("Press enter to start...")
x = input()
# Start

if x != "Jamestest":
  clear()
  while z < 5:
    print(Back.RED+"                               " + "                               " + "                               ")
    sleep(0.1)
    print(Back.GREEN+"                               " + "                               " + "                               ")
    sleep(0.1)
    print(Back.YELLOW + "                               " + "                               " + "                               ")
    sleep(0.1)
    print(Back.BLUE+"                               " + "                               " + "                               " )
    sleep(0.1)
    print(Back.MAGENTA + "                               " + "                               " + "                               ")
    sleep(0.1)
    print(Back.CYAN + "                               " + "                               " + "                               ")
    sleep(0.1)
    print(Back.WHITE + "                               " + "                               " + "                               ")
    sleep(0.1)
    z = z+1
  print(Back.GREEN + "")
  clear()
  sleep(0.2)
  print(Back.LIGHTYELLOW_EX + "")
  clear()
  print("")
  print(Style.BRIGHT + Fore.RED + "                    OREGON TRAIL")
  sleep(3)
  print("                          ...Rework")
  sleep(2)
  print("                            By Mavrick")
  sleep(5)
  print(Back.GREEN + "")
  clear()
  sleep(1)
  print("")
  slowPrint(Style.BRIGHT + "    Welcome to the Oregon Trail." )
  sleep(1)
  slowPrint("   You are in the year 1838.")
  sleep(1)
  slowPrint("   It is the first day of the year.")
  sleep(5)
  print(Back.BLUE + "")

  clear()
  sleep(0.25)
  

  print(Fore.WHITE + "")
  while x != 1:
    clear()
    slowPrint("   You may:")
    x = openChoiceCheck( "Start the Trail" , "Learn More" , "View Credits" , "")
    if x == 2:
      print("The Oregon Trail is a real event that occrued between 1811 - 1840. The trail was travelled by Americans who wanted a \"better life\" in the west. The trail was 2,200 miles long, and it was mostly used by fur traders and trappers until the year 1837, when thousands of immigrants started on the trail to settle new cities in the West...")
      print("Press enter to continue")
      input()
    elif x == 3:
      print("This version of the game is made by Mavrick using the language of Python, but it is entirely based off of the game \"Oregon Trail\" by MECC.")
      print("Press enter to continue")
      input()
  print(Back.LIGHTBLUE_EX + Fore.WHITE + "")
  clear()
  slowPrintCustom("You are the leader of a caravan that will be travelling along the Oregon Trail. There will be four other people with you." , 0.05)
 
  slowPrintCustom("       Who are you?" , 0.05)
  bg = openChoiceCheck("A 26-year-old banker from Detroit, Michigan" , "A 35-year-old carpenter from Richmond, Virginia" , "A 29-year-old farmer from North Carolina" , "")
  sleep(1)
  print(Back.BLACK + Fore.CYAN+ "")
    

  # Traditional end of Jamestest

  if bg == 1:
    inv["Money"] = 500.
  else:
    inv["Money"] = 400
  if bg == 2:
    inv["Wagon Repairs"] = 1
  elif bg == 3:
    inv["Oxen"] = 1
  elif bg == 0:
    "James heafner money:"
    inv["Money"] = 120000000000000000000000

  storeProcess()



while 1 == 1:
  clear()
  printMoney()
  slowPrintCustom("What is the name of your wagon leader?" , 0.01)
  characters[0] = input(">")
    
  clear()
  printMoney()
  print("")
  print("   What are the names of the rest of your crew?")
  print("1: " + characters[0].__str__())
  characters[1] = input("2: ")
  characters[2] = input("3: ")
  characters[3] = input("4: ")
  characters[4] = input("5: ")
  print("_________________________________")
  print("")
  slowPrintCustom("Is this correct?", 0.01)
  print("         1: Yes")
  print("         2: No" )
  y = input(">")
  if y.__str__() == "1" or ((y.__str__()).lower() == "y") :
    break
    print("Something just happened, let's do that again. Sorry...")
    sleep(5)
    
print("Press enter to continue")
input()
sleep(2)
while 1 == 1:
  print(Back.BLACK + Fore.CYAN + "" )
  clear()
  printMoney()
  print("")
  printDayStats()
  print("")
  slowPrintCustom("You are currently in the city of Independence. ", 0.02)
  print("You may:")
  print("")
  answer = openChoiceCheck("Start on the trail" , "Go to the store" , "End your Journey" , "") 
  if answer == 2:
    storeProcess()
    clear()
    
  elif answer == 3:
    clear()
    print("You lasted 0 days... Congratulations, maybe you'll do better next time? I mean, your crew is probably annoyed that you didn't even leave Independence, but I guess here's your stats:")
    print("People alive: 5")
    print("You have " + inv["Money"].__str__() + " dollars.")
    sleep(6)
    print("End of line")
    sleep(5)
    while 1 == 1:
      sleep(0.5)
      clear()
  elif answer == 1:
    break 
  else:
    print("Something happened. Let's do that again")
    sleep(2)
  
clear()
sleep(3)

changeDayColour()


loopUnilLandmark("Fort Kearny" , 712)
slowPrint("Welcome to Fort Kearny. You may:")
currentCity += 1


answer = openChoiceCheck("Continue the trail" , "Go to the General Store" , "Talk to the townsfolk" , "Rest for the day")
if answer == 2:
  storeProcess()
elif answer == 3:
  slowPrint("You go around to talk to the townsfolk ")
  slowPrint("You meet an Indian man from the Shoshoni tribe. He offers to tell you the ways of his people for a small donation")
  slowPrint("He asks for 5 dollars. Do you accept?")
  answer = input("Y or N: ")
  while 1 == 1:
    if answer.lower() == "y":
      slowPrint("He tells you of a raft-crafting technique of his people.")
      slowPrint("You now know how to raft across rivers.")
      print("")
      print("Press enter to continue...")
      input()
      break
    elif answer.lower() == "n":
      slowPrint("You decline the Indian and continue on your business. You'll never know what had to say...")
      break
    else:
      print("Please answer with an answer choice.")
elif answer == 4:
  advanceDay()

while answer != 1:
  print("You may:")
  answer = openChoiceCheck("Continue the trail" , "Go to the General Store" , "Talk to the townsfolk" , "Rest for the day")
  if answer == 2:
    storeProcess()
  elif answer == 3:
    slowPrint("You have already talked to people, there\'s nothing else to hear.")
  if answer == 4:
    advanceDay()

slowPrint("You continue on the trail. 150 miles until you reach the San Juan River")
nextTownName = "San Juan River"
# distanceToTown = 150

# yeet
?