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:
Eryn Wells 2023-02-20 18:02:01 -08:00
parent be7198b16d
commit a542bb956a
3 changed files with 174 additions and 0 deletions

10
erynrl/map/grid.py Normal file
View 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')