Model: Cell {x, y, alive} View: CellView {model: Cell} Collection: Cells
CellView renders a div CellView listens to Cell.change to change b.g. color
On app init:
- Create cells 50x50
- Create CellView for each cell
- Add cells to Collection
- Iterate over collection to compute alive/dead.
- 2-step "prepare" -> "change"
- two methods:
- compute next-state:
- set next_turn_alive should be alive or not
- make transition
- do the actual bg-color/state cleanup/etc
- compute next-state:
- pass over them twiec: first compute next state, second call make transition
- should event change:alive