Make map display empty squares
This commit is contained in:
parent
f5166319e1
commit
7521d7b4ab
4 changed files with 153 additions and 11 deletions
18
utils.py
Normal file
18
utils.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue