Skip to content

The provided materials are part of the workshop 'Collaborative Software Development' at the GridKa School 2017.

License

Notifications You must be signed in to change notification settings

MaineKuehn/workshop-collaborative_software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workshop-collaborative_software

The provided materials are part of the workshop 'Collaborative Software Development' at the GridKa School 2017.

gksolite

A stripped down version of the Game of Life implemented in the "Advanced Python Programming Course". The modules gksolite.plain and 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 gksolite.patterns
A string with line-breaks separating lines on the game board.
gksolite.reader.read_literal
Reads a literal to a nested list of type List[List[int]].
gksolite.boards.PaddedBoard
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
)

About

The provided materials are part of the workshop 'Collaborative Software Development' at the GridKa School 2017.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages