コード例 #1
0
ファイル: test_ai.py プロジェクト: juanibiapina/domb
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)
コード例 #2
0
ファイル: test_ai.py プロジェクト: juanibiapina/domb
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)
コード例 #3
0
ファイル: test_ai.py プロジェクト: juanibiapina/domb
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)