// General cd to be included in other versions of the game // Bryan's improvement include "lib.cd"; package gen; Price = double. Quality = double. PlayerID = int. Player = "player" *s PlayerID *s String. Challenge = "challenge[" String *s PlayerID *s Option(PlayerID) *s Price *s Type *s Option(ChallengeInstance) *s Option(Solution) "]". // ChallengeInstance = *l + "rm[" RawMaterialInstance "]" -. // FinishedProduct = "finish[" Solution *s // Quality "]". History = "history[" *l List(Round) "]". Round = *l "round" *s int *s "[" List(PlayerTransaction) "]" . PlayerTransaction = *l + "ptrans[" Player *s List(Transaction) "]" -. Transaction = *l + "trans[" TransactionType *s Challenge "]" -. TransactionType = Buy | Create | Reoffer | Deliver | Finish. Buy = "BUY". Create = "CREATE". Reoffer = "REOFFER". Deliver = "DELIVER". Finish = "FINISH". 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(Challenge) *s "bought" *s List(Challenge). Config = "Money:" double *l "Rounds:" int *l "Time:"