added game ends

This commit is contained in:
lindsay 2017-08-15 00:08:02 -07:00
parent a00a4b2ffa
commit 99ddd28bc8

View File

@ -26,7 +26,7 @@ function main()
if choice == "1"
print(intro_option1outcome_text)
main()
game_end()
elseif choice == "2"
print(intro_option2outcome_text)
end
@ -46,16 +46,18 @@ function main()
leavehouse()
elseif choice == "3"
print(fridge_option3outcome_text)
main()
game_end()
end
print("Here are your options. \n")
print("Option 1 - Go to your local Safeway. \n")
main()
print("Option 2 - Go to the closest gas station. \n")
choice = input("Choose an option by pressing its number: ")
if choice == "1"
print(car_option1outcome_text)
game_end()
elseif choice == "2"
print(car_option2outcome_text)
end