commit 7ad6e0abc27e8e23e2d7208f48ca8e49c4800f23 Author: crabapple Date: Fri Sep 29 17:25:10 2017 -0700 Initial Prototype diff --git a/4rooms.jl b/4rooms.jl new file mode 100644 index 0000000..791e0fe --- /dev/null +++ b/4rooms.jl @@ -0,0 +1,80 @@ + +include("story.jl") + + + +function printc(color, message::AbstractString="", x...) + print_with_color(color, message) +end + +function input(prompt::AbstractString="") + print(prompt) + return chomp(readline()) +end + +function title() + printc(:light_cyan, " ----------------------------------\n") + printc(:light_cyan, "| 4 Rooms |\n") + printc(:light_cyan, " ----------------------------------\n") + printc(:green, "By: Mollusk and CrabApple\n\n") +end + +function start() + start = input("Press S to start.\n") + if start == "s" + return + end +end + +function instructions() + print("Instructions: You will ecounter 4 rooms, starting with room 1. Each room will \n +contain items for you to choose from. Once you choose an item, it will interact in some way \n +with the items in the next room, or with the room itself. Choose wisely! Your decision impacts \n +your next set of choices. You have 3 tries per room, otherwise you fail the task.\n\n +You may press q to Quit the game at any time.\n\n") + Continue() +end + +function Continue() + Continue = input("Press enter to continue...\n") + if Continue == "" + return + end +end + +function room2() + print("You have reached ROOM 2.\n") +end +function room1() + print("ROOM 1\n\n") + print("You must choose one of 4 options to move to the next room.\n\n") + print("1. Get a lockpick.\n") + print("2. Get a bottle of water.\n") + print("3. Get cookies.\n") + print("4. Get a grenade.\n\n") + choice = input("Make your choice: ") + + if choice == "1" + print("Here are your cookies! You may now move to the next room.\n\n") + Continue() + room2() + elseif choice == "2" + print("") + elseif choice == "3" + print("") + elseif choice == "4" + print("") + + elseif choice == "q" + quit() + + else + print("You did not select one of the given choices. Please begin again.") + end + +end + + +title() +instructions() +room1() \ No newline at end of file diff --git a/plans.txt b/plans.txt new file mode 100644 index 0000000..e69de29 diff --git a/story.jl b/story.jl new file mode 100644 index 0000000..88c27fd --- /dev/null +++ b/story.jl @@ -0,0 +1,2 @@ +go_to_bed = "go to bed\n" +test2 = "go to bed now\n" \ No newline at end of file