-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.mli
48 lines (40 loc) · 890 Bytes
/
command.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
type start_resource = string
type start_amt = int
type end_resource = string
type end_amt = int
type structure = string
type command =
| Quit
| Invalid
| Show
| Buy
| Finish
| Map
| Cheat
| Length
| Play of string
| BuildRoad of int * int
| BuildSettlement of int
| BuildCity of int
| MarineTrade of start_resource * end_resource
| ThreeTrade of start_resource * end_resource
| TwoTrade of start_resource * end_resource
| PlayerTrade of start_resource * start_amt * end_resource * end_amt
val parse : string -> command
type affirmation =
| NotAffirmative
| Accept
| Reject
val parse_affirmative : string -> affirmation
type robber =
| NotLocation
| NewLocation of string
val parse_robber : string -> robber
type resource =
| NotResource
| Ore
| Wheat
| Wool
| Brick
| Lumber
val parse_resource : string -> resource