def next_tick(cell_alive, number_of_neighbors): 
    """Returns a cell's state in the next turn
    
    Three conditions for the next state are layed out:
    1. A cell is alive and has 2/3 neighbors, it stays alive
    2. A cell is dead and has 3 neighbors, it is born
    3. Neither of the above, it dies
    """

    if cell_alive and number_of_neighbors in [2, 3]:
            return True
    elif not cell_alive and number_of_neighbors == 3:
            return True
    return False