Add CellularAtomataMapGenerator
First pass at a cellular atomata map generator. Add map.grid and a make_grid function to make it easier to make numpy arrays for Map purposes. Add ca.py to test the generator.
This commit is contained in:
parent
be7198b16d
commit
a542bb956a
3 changed files with 174 additions and 0 deletions
10
erynrl/map/grid.py
Normal file
10
erynrl/map/grid.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
import numpy as np
|
||||
|
||||
from .tile import Empty
|
||||
from ..geometry import Size
|
||||
|
||||
|
||||
def make_grid(size: Size):
|
||||
return np.full(size.numpy_shape, fill_value=Empty, order='F')
|
Loading…
Add table
Add a link
Reference in a new issue