예제 #1
0
def test_hex_neighbor(Hexes):
    for hex in Hexes:
        for d in range(6):
            refAns = ref.neighbor(hex, d)
            implAns = hex.neighbor(d)
            assert ref.equals(refAns, implAns)
예제 #2
0
def test_hex_direction(Hexes):
    for hex in Hexes:
        for d in range(6):
            refAns = ref.direction(d)
            implAns = hex.direction(d)
            assert ref.equals(refAns, implAns)
예제 #3
0
def test_hex_not_equals(UnEqualHexes):
    for a, b in UnEqualHexes:
        refAns = ref.equals(a, b)
        implAns = a == b
        assert refAns == implAns
예제 #4
0
def test_hex_scale(Hexes):
    for idx, hex in enumerate(Hexes):
        refAns = ref.scale(hex, idx)
        implAns = hex * idx
        assert ref.equals(refAns, implAns)
예제 #5
0
def test_hex_subtraction(Hexes):
    for hex in Hexes:
        refAns = ref.subtract(hex, hex)
        implAns = hex - hex
        assert ref.equals(refAns, implAns)
예제 #6
0
def test_hex_addition(Hexes):
    for hex in Hexes:
        refAns = ref.add(hex, hex)
        implAns = hex + hex
        assert ref.equals(refAns, implAns)