diff --git a/keyboard.lua b/keyboard.lua index 00495a8..522ac74 100644 --- a/keyboard.lua +++ b/keyboard.lua @@ -21,6 +21,7 @@ function update_keyboard() local buffer = k_s k_s = love.keyboard.isDown("s") if k_s and not buffer then + print(save()) end local buffer = k_o k_o = love.keyboard.isDown("o") diff --git a/main.lua b/main.lua index 0816d18..a63271f 100644 --- a/main.lua +++ b/main.lua @@ -5,4 +5,5 @@ function love.load() require("mouse") require("keyboard") require("tiles") + require("save") end diff --git a/save.lua b/save.lua new file mode 100644 index 0000000..0ef4348 --- /dev/null +++ b/save.lua @@ -0,0 +1,13 @@ +function save() + output = "\n-" + for i = 1, 28, 1 do output = "-"..output end + for i = 1, #selected_screen, 1 do + output = output..selected_screen:sub(i, i) + if i % 26 == 0 then output = output.."-\n-" end + end + for i = 1, 26, 1 do output = output.."-" end + return output +end + +function load() +end