about summary refs log tree commit diff stats
path: root/lil/game.lil
blob: b75c565d4fa0238e04f97720831d7999098751d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
on ask_for do 
	show["B(anana)"]
	show["A(pples)"]
	input["> "]
end

on process x do
	if x ~ "B"
		show["You said B"]
	elseif x ~ "A"
		show["You said A"]
	elseif x ~ "Q"
		active_game:0
	else 
		show[x, "unknown input"]
	end
end

active_game:1

while active_game ~ 1	
	user_input:ask_for[]
	process[user_input]
end