## ## gol_getting_started.py ## ## by Kristina Striegnitz ## ## version 2/12/2010 ## ## Code start from for an implementation of Conway's game of ## life. Fill in the missing code as described in the assignment. ## from gol_display import run_game ROWS = 40 COLS = 40 DEAD = 0 ALIFE = 1 def create_grid(rows, cols): """ You need to complete this function. """ grid = [] return grid def play_gol(): grid = create_grid(ROWS, COLS) cell_size = 10 run_game(grid, cell_size, on_click, next_gen) def on_click(grid, row, col): """ You need to complete this function. """ return grid def life_neighbors(grid,row,col): """ You need to complete this function. """ n = 0 return n def next_gen(grid): """ You need to complete this function. """ new_grid = create_grid(ROWS, COLS) return new_grid