summaryrefslogtreecommitdiff
path: root/tests/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.lua')
-rw-r--r--tests/test.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test.lua b/tests/test.lua
index 74bf797..644b54b 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -24,12 +24,12 @@ function test_api()
24end 24end
25 25
26function get_random_color() 26function get_random_color()
27 local keys = {} 27 local keys = {}
28 for k in pairs(color) do 28 for k in pairs(color) do
29 table.insert(keys, k) -- Collect all keys 29 table.insert(keys, k) -- Collect all keys
30 end 30 end
31 local randomKey = keys[math.random(1, #keys)] -- Select a random key 31 local randomKey = keys[math.random(1, #keys)] -- Select a random key
32 return color[randomKey] -- Return the corresponding color 32 return color[randomKey] -- Return the corresponding color
33end 33end
34 34
35function test_json() 35function test_json()
@@ -62,7 +62,7 @@ function test_buttons()
62 if button_down(button.PAD_RIGHT) then 62 if button_down(button.PAD_RIGHT) then
63 draw_text("Pad Right", 10, 100, 20, color.VIOLET) 63 draw_text("Pad Right", 10, 100, 20, color.VIOLET)
64 end 64 end
65 65
66 if button_down(button.A) then 66 if button_down(button.A) then
67 draw_text("A", 150, 10, 20, color.VIOLET) 67 draw_text("A", 150, 10, 20, color.VIOLET)
68 end 68 end