Commit 0c9c3eb8 authored by Reece's avatar Reece

Completed and tested

Finished the game, all routes now work. Has been tested a couple of times as well.
parent a7274dc4
......@@ -22,6 +22,7 @@ route = ["route 1", "route 2"]
bankbal = 0
insurancevalue = 0
contract = 0
difficulty = 0
payoutloss = 0
date = 0
################################################################################################
......@@ -29,9 +30,9 @@ date = 0
################################################################################################
Routes = [
['Roswyth Docks - Aberdeen', 'Port of Gothenburg - Sweden', 3, 100000],
['Scotland -> France', '7 days', 50000, 'I went to France once, but it wasn\'t for me. Anyway that doesn\'t matter, pretty simple one this run, just get to France in 7 days and get paid.'],
['Scotland -> Portugal', 'dunno', 75000, 'Easy enough, just be careful the sea can get a bit rough.']
[0, 'Roswyth Docks - Aberdeen', 'Port of Gothenburg - Sweden', 3, 100000, "Okay Scotland to Sweden. Please be careful with this cargo its worth a lot of money and is very important. You have 3 days to get there so you may want to get a move on captain.\n"],
[1, 'Roswyth Docks - Aberdeen', 'Le Harve - France', 5, 50000, 'I went to France once, but it wasn\'t for me. Anyway that doesn\'t matter, pretty simple one this run, just get to France in 7 days and get paid.'],
[2, 'Roswyth Docks - Aberdeen', 'Leixoes - Portugal', 7, 75000, 'Easy enough, just be careful the sea can get a bit rough.']
]
Outcomes = [
......@@ -104,10 +105,13 @@ response1 = ""
while response1.lower() not in cash:
response1 = input("Now Captain " + playername + ", the money needs to be discussed.\n£1,000,000 (Easy)\n£500,000 (Normal)\n£100,000 (Hard)\nHow much would you like to borrow to get you started?\n\nEasy/Normal/Hard\n").lower()
if response1 == "easy":
difficulty = 0
bankbal = 1000000
elif response1 == "normal":
difficulty = 1
bankbal = 500000
elif response1 == "hard":
difficulty = 2
bankbal = 100000
else:
print("Sorry Captain " + playername + ", I'm not sure what you said there, please try again.\n");
......@@ -159,19 +163,19 @@ while date < 32:
response3 = input("Good Morning captain we have 3 contracts available for you to carry out. Please take a look....\n\nCONTRACT 1 ~ COST: £20,000 ~ PAYOUT ~ £100,000 ~\n-Cargo in excess of £10,000,000\n-Scotland -> Sweden\n-3 Day limit from acceptance of contract\n\nCONTRACT 2 ~ COST:£10,000 ~ PAYOUT ~ £50,000~\n-Cargo in excess of £100,000\n-Scotland -> France\n-7 day time limit from acceptance of contract\n\nCONTRACT 3 ~ COST: :£15,000 ~ PAYOUT ~ £75,000~\n-Cargo in excess of £2,500,000\n-Scotland -> Portugal\n-5 day time limit from acceptance of contract\n\nplease pick a contract 1/2/3\n")
if response3 == "1":
contract = 0
contract = Routes[0][0]
bankbal = bankbal - 20000
print("Okay Scotland to Sweden. Please be careful with this cargo its worth a lot of money and is very important. You have 3 days to get there so you may want to get a move on captain.\n")
print(Routes[0][5])
elif response3 == "2":
contract = 1
contract = Routes[1][0]
bankbal = bankbal - 10000
print("Scotland to France. I went to France once but it wasnt for me. Anyway that doesn't matter, pretty simple one this run just get to France in 7 days and get paid.\n")
print(Routes[1][5])
elif response3 == "3":
contract = 2
contract = Routes[2][0]
bankbal = bankbal - 15000
print("Scotland to Portugal, easy enough just be careful the sea can get a bit rough.\n")
print(Routes[2][5])
else:
print("Have you been in the pub again captain? you aren't making any sense try saying that again but slower")
......@@ -187,13 +191,13 @@ while date < 32:
payoutloss = 0
print("--- Summary ---\nCompany name: " + companyName + "\nBank balance: ", bankbal, "\nSchedule: Day of departure\nTime: 12:36pm\nWeather: Fair")
print("----------------------------------------------\nCurrent Location: " + Routes[contract][0] + "\nTarget Location: " + Routes[contract][1] + "\nContract duration:", Routes[contract][2])
print("----------------------------------------------\nCurrent Location: " + Routes[contract][1] + "\nTarget Location: " + Routes[contract][2] + "\nContract duration:", Routes[contract][3])
print("\nDave: Okay Captain, all of the cargo has been loaded. If you\'re ready, we can set off!\n")
input("Press 'Enter' to continue")
for i in range(Routes[contract][2]):
for i in range(Routes[contract][3]):
clear()
day = i+1
......@@ -225,6 +229,7 @@ while date < 32:
input("Press 'Enter' to continue")
clear()
hour = randint(1, 12)
minute = randint(1, 59)
if (hour < 10):
......@@ -234,8 +239,8 @@ while date < 32:
print("--- Summary ---\nCompany name: " + companyName + "\nBank balance: ", bankbal, "\nSchedule: Unload cargo\nTime:", hour, ":", minute, "\nWeather: Fair")
income = (Routes[contract][3] - payoutloss)
print("----------------------------------------------\nCurrent Location: " + Routes[contract][1] + "\nContract payout: ", Routes[contract][3], "\nPenalties: ", payoutloss, "\nTotal Income from Haul: ", income)
income = (Routes[contract][4] - payoutloss)
print("----------------------------------------------\nCurrent Location: " + Routes[contract][2] + "\nContract payout: ", Routes[contract][4], "\nPenalties: ", payoutloss, "\nTotal Income from Haul: ", income)
bankbal = bankbal + income
print("")
......@@ -249,9 +254,20 @@ if date < 32:
exit()
else:
print("Okay Captain! You've managed to make it this far! Let\'s see how you\'ve done!")
print("Obviously, We would like out loan back, so we will deduct that from your balance.")
print("Obviously, We would like our loan back, so we will deduct that from your balance.")
input("Press 'Enter' to continue")
print("--- Summary ---\nCompany name: " + companyName + "\nBank balance: ", bankbal, "\nSchedule: Debrief\n ---------------")
clear()
print("--- Summary ---\nCompany name: " + companyName + "\nBank balance: ", bankbal)
if difficulty == 0:
bankbal = bankbal - 1000000
elif difficulty == 1:
bankbal = bankbal - 500000
elif difficulty == 2:
bankbal = bankbal - 100000
else:
bankbal = bankbal - 1000000
print("Bank balance after loan deduction: ", bankbal, "\nSchedule: Debrief\n ---------------")
if bankbal < 0:
print("Unfortunately, you haven\'t managed to break even and you\'re now in debt.")
print("As this was actually all a simulation, nothing will happen and we will clear your balance.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment