## ## gol_with_file_input_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 = 0 COLS = 0 DEAD = 0 ALIFE = 1 def make_grid_from_file(filename): """ You need to complete this function. """ global ROWS global COLS grid = [] return grid def play_gol_file_input(filename): grid = make_grid_from_file(filename) 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 ## To test: play_gol_file_input("gol_input_mini.txt") #play_gol_file_input("gol_glider_gun.txt")