summaryrefslogtreecommitdiff
path: root/test/main.lua
blob: 0fc9be3d14d5da4db2ae77772348e53fe6d71df0 (plain)
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 test_json()
	local file = io.open("test/test.json", "r")
	local content = file:read("*a")
	file:close()

	local data = json.decode(content)

	print("name: " .. data.name)
	for _, n in pairs(data.numbers) do
		print(" - number: " .. n)
	end
end

function test_graphics()
	open_window(600, 600, "My Game")
	set_fps(60)

	while window_running() do
		begin_drawing()
		clear_window(color.RAYWHITE)
		draw_fps()
		end_drawing()
	end

	close_window()
end

test_json()
test_graphics()