Make map display empty squares

This commit is contained in:
Joscha 2017-04-05 19:44:21 +00:00
parent f5166319e1
commit 7521d7b4ab
4 changed files with 153 additions and 11 deletions

18
utils.py Normal file
View file

@ -0,0 +1,18 @@
from collections import namedtuple
Position = namedtuple("Position", "x y")
CHUNK_WIDTH = 16
CHUNK_HEIGHT = 8
def chunkx(value):
return value//CHUNK_WIDTH
def chunky(value):
return value//CHUNK_HEIGHT
def inchunkx(value):
return value%CHUNK_HEIGHT
def inchunky(value):
return value%CHUNK_WIDTH