Add the rest of DATC 6.A to the script tests

This commit is contained in:
Tim Van Baak 2024-09-06 16:17:55 +00:00
parent 5e2d495fa5
commit 7c0cdb0a21
5 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# 6.A.10. TEST CASE, SUPPORT ON UNREACHABLE DESTINATION NOT POSSIBLE
# The destination of the move that is supported must be reachable by the supporting unit.
unit Austria A Venice
unit Italy F Rome
unit Italy A Apulia
---
Austria:
A Venice Hold
Italy:
F Rome Supports A Apulia - Venice
A Apulia - Venice
---
# The support of Rome is illegal, because Venice cannot be reached from Rome by a fleet. Venice is not dislodged.
assert hold-order Rome
assert not-dislodged Venice

View File

@ -0,0 +1,19 @@
# 6.A.11. TEST CASE, SIMPLE BOUNCE
# Two armies bouncing on each other.
unit Austria A Vienna
unit Italy A Venice
---
Austria:
A Vienna - Tyrolia
Italy:
A Venice - Tyrolia
---
# The two units bounce.
assert no-move Vienna
assert no-move Venice

View File

@ -0,0 +1,24 @@
# 6.A.12. TEST CASE, BOUNCE OF THREE UNITS
# If three units move to the same area, the adjudicator should not bounce the first two units and then let the third unit go to the now open area.
unit Austria A Vienna
unit Germany A Munich
unit Italy A Venice
---
Austria:
A Vienna - Tyrolia
Germany:
A Munich - Tyrolia
Italy:
A Venice - Tyrolia
---
# The three units bounce.
assert no-move Vienna
assert no-move Munich
assert no-move Venice

View File

@ -0,0 +1,20 @@
# 6.A.8. TEST CASE, SUPPORT TO HOLD YOURSELF IS NOT POSSIBLE
# An army cannot get an additional hold power by supporting itself.
unit Italy A Venice
unit Italy A Tyrolia
unit Austria F Trieste
---
Italy:
A Venice - Trieste
A Tyrolia Supports A Venice - Trieste
Austria:
F Trieste Supports F Trieste
---
# The army in Trieste should be dislodged.
assert dislodged Trieste

View File

@ -0,0 +1,14 @@
# 6.A.9. TEST CASE, FLEETS MUST FOLLOW COAST IF NOT ON SEA
# If two provinces are adjacent, that does not mean that a fleet can move between those two provinces. An implementation that only holds one list of adjacent provinces for each province is incorrect.
unit Italy F Rome
---
Italy:
F Rome - Venice
---
# Move fails. An army can go from Rome to Venice, but a fleet cannot.
assert hold-order Rome