The provided materials are part of the workshop 'Collaborative Software Development' at the GridKa School 2018. The slides of the workshop can be viewed in your browser.
A stripped down version of the Game of Life implemented in the "Advanced Python Programming Course".
gksolite.sparse provide classes to load and advance a GOL board.
Their interface adheres to:
# initialize a new board from a list GOL(board: List[List[int]]) -> gol # advance the simulation by one step gol.advance() -> None # get the current board as a List[List[int]] gol.get_matrix()
If you need a new board, you should use three elements:
- literals, e.g. from
- A string with line-breaks separating lines on the game board.
- Reads a literal to a nested list of type
- Pad a nested list to provide more space for a board.
For example, you can load an exponentially growing pattern to a ~200x200 board:
from gksolite import patterns, reader, boards board = boards.PadderBoard( reader.read_literal( patterns.BASELINE ), border=100 )