示例#1
0
def test_hit():
    b = Board()
    b.add_counter(5, 5)

    assert b.potshot(5, 5) == Board.HIT
    assert b.defeated()
    b.display()
示例#2
0
def test_near_miss():
    b = Board()
    b.add_counter(3, 3)

    assert Board.NEAR == b.potshot(2, 2)
    assert not b.defeated()
示例#3
0
def test_miss():
    b = Board()
    b.add_counter(3, 3)

    assert Board.MISS == b.potshot(1, 2)
    assert not b.defeated()