From a00a4b2ffa4f02933c3021e11bc9babe49360240 Mon Sep 17 00:00:00 2001 From: lindsay Date: Tue, 15 Aug 2017 00:07:51 -0700 Subject: [PATCH] added game end --- lib/functions.jl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/functions.jl b/lib/functions.jl index 7621773..e051cb2 100644 --- a/lib/functions.jl +++ b/lib/functions.jl @@ -1,3 +1,22 @@ +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: ") + 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 + function dui() print("Here are your options. \n")