示例#1
0
文件: test_gol.py 项目: ssfrr/gol
def test_dead_cell_with_three_neighbors_is_born():
    cell = (4,5)
    comfortable_world = set([cell, (3,5), (4,4), (5,5)])
    assert g.cell_is_born(comfortable_world, cell) is True
示例#2
0
文件: test_gol.py 项目: ssfrr/gol
def test_dead_cell_with_two_neighbors_stays_dead():
    cell = (4,5)
    lonely_world = set([cell, (3,5), (4,4)])
    assert g.cell_is_born(lonely_world, cell) is False