I. External Representations of Messages
The following enumeration specifies the format of the text messages that
clients (players) and servers (Bazaar administrators) will exchange.
<server-to-client messages> is one of:
- (<string> <color> <equations>)
- (inform <string>)
- (punish <pebbles>)
- (turn <card> <card> <card> <card>)
- (okay)
- (okay <color>)
- <number>
<client-to-server messages> is one of:
- <string>
- (done)
- (roll-die <color>)
- (trade <pebbles> <pebbles>)
- (buy <card>)
<color> is one of:
- red
- green
- white
- yellow
- blue
<pebbles> is:
(<color>+)
<equations> is:
((<pebbles> <pebbles>)+)
<card> is:
((<color> <color> <color> <color> <color>) [0|1|2])
<string> is one of:
%% all keyboard characters except for " may appear between the quotes
<number> is one of:
Here is a brief summary of the extended BNF notations:
<color>+ |
means 1 or more <color>s
|
(<pebbles> <pebbles>)+ |
means 1 or more (<pebbles> <pebbles>)s
|
[0|1|2] |
means 0 xor 1 xor 2
|
white space (space, tab, newline) doesn't matter