From ec6a391cb9cf0c0feac0fe3615a59cc7cb6db2d5 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 3 Feb 2023 01:32:09 +0000 Subject: drawing changes, world generation, perlin noise --- common/chunk.lua | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'common/chunk.lua') diff --git a/common/chunk.lua b/common/chunk.lua index a9a8bc5..8e2ec40 100644 --- a/common/chunk.lua +++ b/common/chunk.lua @@ -20,17 +20,6 @@ Chunk.__index = Chunk function Chunk.make(tiles) return setmetatable({tiles=tiles},Chunk) end -function Chunk.gen() - -- todo actual worldgen - local tiles = {} - for i=0,CHUNK_SIZE-1 do - for j=0,CHUNK_SIZE-1 do - tiles[index(i,j)] = (math.random()<0.5) - end - end - - return Chunk.make(tiles) -end function Chunk.at(self,hoffs) if not index_ok(hoffs.q,hoffs.r) then return nil end return self.tiles[index(hoffs.q,hoffs.r)] -- cgit v1.2.3