only mapPopulate empty db

This commit is contained in:
Jonathan 2024-03-18 19:06:37 -05:00
parent 989d33ff5e
commit 6b371066d4
247 changed files with 304770 additions and 62 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
logs/
database.sqlite3

52
app.lua
View File

@ -13,13 +13,13 @@ app:enable("etlua")
app.layout = require "views.layout"
app:post("/clickme", function(self)
self.plane = "P-38L"
<<<<<<< HEAD
mapFunc:populate(map)
=======
mapFunc.populate(self, map)
>>>>>>> refs/remotes/origin/master
return {self.plane, layout = false}
self.text = "Map is already initialized. Beginning game."
self.isPopulated = mapFunc:mapExists(map)
if not self.isPopulated then
mapFunc:populate(map)
self.text = "Populated map."
end
return {self.text, layout = false}
end)
app:get("/", function(self)
@ -42,41 +42,3 @@ end)
return app

View File

@ -4,7 +4,6 @@ config("development", {
server = "nginx",
code_cache = "off",
num_workers = "1",
port = "1010"
sqlite = {
database = "database.sqlite3",
-- open_flags = ...

BIN
database.sqlite3 Normal file

Binary file not shown.

View File

@ -1,6 +1,3 @@
<<<<<<< HEAD
local map = {
map_tiles = {
{"-", "-", "w", "w", "-", "-", "-", "-", "-", "-"},
@ -21,20 +18,18 @@ local map = {
x = h,
y = i,
occupied_by_type = self.map_tiles[h][i],
=======
local map = {
populate = function(self, map)
for h=1,100 do
for i=1,100 do
local tile = map:create({
x = h,
y = i,
occupied_by_type = "",
>>>>>>> refs/remotes/origin/master
occupied_by_id = ""
})
end
end
end,
mapExists = function(self, map)
local f = map:select("limit 1")
if not f[1] then
return false
else
return true
end
end
}
local tiles = {}

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.amber.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.blue.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.colors.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More