cellular_automata.conways_game_of_life ====================================== .. py:module:: cellular_automata.conways_game_of_life .. autoapi-nested-parse:: Conway's Game of Life implemented in Python. https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life Attributes ---------- .. autoapisummary:: cellular_automata.conways_game_of_life.BLINKER cellular_automata.conways_game_of_life.GLIDER cellular_automata.conways_game_of_life.images Functions --------- .. autoapisummary:: cellular_automata.conways_game_of_life.generate_images cellular_automata.conways_game_of_life.new_generation Module Contents --------------- .. py:function:: generate_images(cells: list[list[int]], frames: int) -> list[PIL.Image.Image] Generates a list of images of subsequent Game of Life states. .. py:function:: new_generation(cells: list[list[int]]) -> list[list[int]] Generates the next generation for a given state of Conway's Game of Life. >>> new_generation(BLINKER) [[0, 0, 0], [1, 1, 1], [0, 0, 0]] .. py:data:: BLINKER :value: [[0, 1, 0], [0, 1, 0], [0, 1, 0]] .. py:data:: GLIDER :value: [[0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0,... .. py:data:: images :value: []