%% ------------------------------------------------------------------
%% a test case for play-one-turn (Project 9)
esac = %% a standard case (MODIFIED)
fsth %% the first hand
xtrn %% a turn
mesg %% the get message from the proxy player to admin
done %% the done message that the proxy player sends
%% the expected result:
bool %% is this the end of the battle?
borc %% the return card (or false)
slst %% the discards
from %% did the player take the cards from the stack or the deck?
atta %% (possibly empty) list of attacks
| %% A CASE THAT CAUSES A CHEATING ERROR
fsth %% the first hand
xtrn %% a turn
mesg %% the get message from the proxy player to admin
done %% the done message that the proxy player sends
| %% A CASE THAT CAUSES A BEHAVIORAL CONTRACT ERROR
fsth %% the first hand
xtrn %% a turn
mesg %% the get message from the proxy player to admin
done %% the done message that the proxy player sends
| %% A CASE THAT CAUSES A TIMING CONTRACT ERROR
fsth %% the first hand
xtrn %% a turn
done %% the done message that the proxy player sends
mesg ...
%% a sequence of messages from the proxy player to admin
resp =
|
|
%% ------------------------------------------------------------------
%% FIRST HAND
fsth = squd
%% ------------------------------------------------------------------
%% a turn (for testing "turn playing")
xtrn =
stck %% the deck
stck %% the stack
slst %% ALLIES bombers, attackable by AXIS fighters
slst %% AXIS bombers, attackable by ALLIES fighters
%% ------------------------------------------------------------------
%% STACK
stck = card ...
%% ------------------------------------------------------------------
%% CARDS
card =
|
|
%% ------------------------------------------------------------------
%% MESSAGES
mesg =
|
okay =
%% ------------------------------------------------------------------
%% FINAL MESSAGE
done = borc slst atck ...
| card slst atck ...
atck =
squd %% the fighters and ...
squd %% ... the bombers that they attack
%% ------------------------------------------------------------------
%% SQUADRONs
squd = card ...
%% ------------------------------------------------------------------
%% BOOLEAN
bool =
|
borc =
| card
%% ------------------------------------------------------------------
%% LIST OF SQUADRONS
slst = squd ...
%% ------------------------------------------------------------------
%% the FROM format
from =
|
%% ------------------------------------------------------------------
%% a list of attacks
atta =
atck ...