-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext_printer.lua
More file actions
29 lines (26 loc) · 899 Bytes
/
text_printer.lua
File metadata and controls
29 lines (26 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function print_text_by_game_state()
if app_state == GAME_OVER then
print_game_over_message()
elseif app_state == GAME_WON then
print_victory_message()
elseif app_state == INSTRUCTIONS then
print_game_instructions()
end
end
function print_game_over_message()
print("you deathed, it seems.")
print("press shooting button when ready.")
end
function print_victory_message()
print("all monsters defeated! game won!")
print("press shooting button to restart.")
end
function print_game_instructions()
print("element + enemy to eliminate.\n")
print("why? they're hunting you down!\n")
print("how would that help you though?\n")
print("in the desert, \nwater can't survive\n")
print("sand is swept away \nby the stream.\n")
print("they would only act when you do.\n\n")
print("press shooting button when ready.\n")
end