Example #1
0
def test_chase_northwest():
    target.pos = (0, 0)
    chaser.pos = (2, 2)

    chase_ai = ChaseAI(target)
    chase_ai.update(chaser)

    chaser.move.assert_called_with(directions.NW)
Example #2
0
def test_chase_southeast():
    target.pos = (4, 4)
    chaser.pos = (2, 2)

    chase_ai = ChaseAI(target)
    chase_ai.update(chaser)

    chaser.move.assert_called_with(directions.SE)
Example #3
0
def test_chase_east():
    target.pos = (4, 0)
    chaser.pos = (2, 0)

    chase_ai = ChaseAI(target)
    chase_ai.update(chaser)

    chaser.move.assert_called_with(directions.E)