// General cd to be included in other versions of the game include "lib.cd"; package gen; Price = double. Quality = double. PlayerID = int. Player = "player" *s PlayerID *s String. Derivative = "deriv[" String *s PlayerID *s Option(PlayerID) *s Price *s Type *s Option(RawMaterial) *s Option(FinishedProduct) "]". RawMaterial = *l + "rm[" RawMaterialInstance "]" -. FinishedProduct = "finish[" IntermediateProduct *s Quality "]". History = "history[" *l List(Round) "]". Round = *l "round" *s int *s "[" List(PlayerTransaction) "]" . PlayerTransaction = *l + "ptrans[" Player *s List(Transaction) "]" -. Transaction : BuyTrans | CreateTrans | DeliverTrans | ReofferTrans | FinishTrans. BuyTrans = "BUY" *s String. CreateTrans = "CREATE" *s String *s Type *s Price. DeliverTrans = "DELIVER" *s String *s RawMaterial. ReofferTrans = "REOFFER" *s String *s Price. FinishTrans = "FINISH" *s String *s FinishedProduct. Players = "players[" List(Player) "]". Pair(A,B) = *s A *s B *s. Accounts = "accounts[" List(Pair(PlayerID, Double)) "]". Store = "store[" List(Pair(PlayerID, PlayerStore)) "]". PlayerStore = "pstore" *s "forsale" *s List(Derivative) *s "bought" *s List(Derivative). Config = "Money:" double *l "Rounds:" int *l "Time:"