quest-for-sundrop/lib/functions.jl

50 lines
1.0 KiB
Julia
Raw Normal View History

2017-08-15 03:00:52 -07:00
2017-08-15 00:07:51 -07:00
function game_end()
while true
print("Your quest ends here. Or does it?\n\n")
choice = input("Would you like to restart your quest? Y/N: ")
2017-08-15 03:00:52 -07:00
2017-08-15 00:07:51 -07:00
if choice == "Y"
main()
elseif choice == "y"
main()
elseif choice == "N"
exit()
elseif choice == "n"
exit()
else
print("That was not one of your choices.")
end
end
end
2017-08-15 03:00:52 -07:00
2017-08-14 23:46:08 -07:00
function dui()
print("Here are your options. \n")
print("Option 1 - Go to your local Safeway. \n")
print("Option 2 - Go to the closest gas station. \n")
2017-08-15 03:00:52 -07:00
2017-08-14 23:46:08 -07:00
choice = input("Choose an option by pressing its number: ")
2017-08-15 03:00:52 -07:00
2017-08-14 23:46:08 -07:00
if choice == "1"
2017-08-15 03:00:52 -07:00
print(dui_car_option1,"\n")
game_end()
2017-08-14 23:46:08 -07:00
elseif choice == "2"
print("The cops pull you over and smell malt liquor on your breath.
2017-08-15 03:00:52 -07:00
You have gotten a DUI. \n")
game_end()
2017-08-14 23:46:08 -07:00
end
end
2017-08-15 03:00:52 -07:00
2017-08-14 23:46:08 -07:00
function leavehouse()
print("You get in your car to find glass bottled Sun Drop. \n")
end