Created
January 27, 2022 15:33
-
-
Save Hoekstraa/29e5c06f20e206a7e96835594696e87b to your computer and use it in GitHub Desktop.
Simple multiple choice game definition in json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"start":["Welcome to this little game!",{"Thank you!":"goto"}],"goto":["Where would you like to go?",{"The airport":"airprt","The trainstation":"tsttn","A busstop nearby":"busstop"}],"airprt":["You arrive at the airport, what plane are you taking?",{"None, screw you!":"truelove","Germany":"de"}],"tsttn":["You arrive at the trainstation, in what direction are you gonna take a train?",{"Germany":"de","Nevermind, I'd rather go by plane.":"airprt"}],"busstop":["You go towards a busstop you see in the distance.",{"Continue walking":"busstop2","Fuck it, go back!":"goto"}],"truelove":["You find your true love, you go live with them in the bahamas.",{}],"busstop2":["You stand at the busstop for a while..",{"Wait..":"truelove","You walk away from your now past live":"truelove"}],"de":["You live the rest of your life, alone but satisfied, in Germany.",{}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dataset can be read as follows: hashmap of string -> array,
where string is a location and the array has: string and hashmap,
the array's string is a message to display on screen and the hashmap is a choice(string) -> the location to go to if chosen(string).