summaryrefslogtreecommitdiff
path: root/client/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'client/main.lua')
-rw-r--r--client/main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/main.lua b/client/main.lua
index 5884186..b5d322e 100644
--- a/client/main.lua
+++ b/client/main.lua
@@ -6,6 +6,9 @@ local PLAYER_SIZE = 30
local local_player = nil
+
+math.randomseed(os.time())
+
-- {
-- pos={100,100},
-- color={love.math.colorFromBytes(0xdf,0x73,0xff)},
@@ -13,6 +16,9 @@ local local_player = nil
local host,peer
+
+local chunk = require"common.chunk".Chunk.make()
+
local function draw_player(pl,me)
local hplsz = PLAYER_SIZE/2
love.graphics.setColor(pl.color)
@@ -103,12 +109,17 @@ function love.update(dt)
end
function love.draw()
+ love.graphics.clear(1,1,1)
if local_player then
draw_player(local_player,true)
end
for _,pl in pairs(remote_players) do
draw_player(pl)
end
+
+ -- require"drawing".drawhex({x=200,y=200},40)
+ require"drawing".draw_chunk(chunk)
+
end
function love.load()