コード例 #1
0
def test_recalculate_fitness_rotations():
    rotations = [F, R, U, B, L, D, Fi, Ri, Ui, Bi, Li, Di]
    for rotation in rotations:
        c = Cube()
        rotation(c)
        c.recalculate_fitness()
        assert c.fitness == 52
コード例 #2
0
def test_recalculate_fitness_rotations():
    rotations = [F, R, U, B, L, D,
                 Fi, Ri, Ui, Bi, Li, Di]
    for rotation in rotations:
        c = Cube()
        rotation(c)
        c.recalculate_fitness()
        assert c.fitness == 52
コード例 #3
0
def test_recalculate_fitness_fresh_cube():
    c = Cube()
    c.recalculate_fitness()

    assert c.fitness == 0
コード例 #4
0
def test_recalculate_fitness_fresh_cube():
    c = Cube()
    c.recalculate_fitness()

    assert c.fitness == 0