June 2015
Beginner
348 pages
8h 44m
English
The following code is an implementation of the Game of Life, with some modifications:
The most important data structure in the code is a two-dimensional array, holding the color values of the pixels on the game screen. This array is initialized with random values and then recalculated for each iteration of the game loop. Find more information about the involved functions in the next section.
def get_pixar(arr, weights): states = ndimage.convolve(arr, weights, mode='wrap') bools = (states ...
Read now
Unlock full access