You will sure find a lot of complex stuff, like various MUDs đ Keep it simple. The game loop is like this:
1. generate random description of the surroundings, like
"$distance km: You are in the dark forest"
2. present options, initially just âgo forwardâ, in the form of menu, like
1. Go forward 0. Exit game
3.
readln
input and process it
4. execute selected action (for âgo forwardâ itâs just
distance++
)
5. go to #1
Thatâs it for a start!
Then, introduce random and if, two major building blocks for a start. Replace surroundings with âYou are in ${place}â, where
place
is something like
val place : String
val number = random(3)
if (number == 0) place = "the dark forest" else if (number == 1) place = "the smelly swamp" else place = "the shitty toilet"
Work with your and kidâs imagination to add more and more đ