Skip to content
master
Switch branches/tags
Go to file
Code
This branch is 8 commits ahead, 21 commits behind MaineKuehn:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.rst

workshop-collaborative_software

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.

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 2018.

Resources

License

Releases

No releases published

Packages

No packages published

Languages