-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.mli
39 lines (26 loc) · 1.06 KB
/
client.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
(*Client*)
open Async.Std
open State
type state = c_state
val get_time: unit -> int
val get_c_uID: unit -> int
(*connect_server allows the client to connect to a server*)
val connect_server: string -> string -> unit Deferred.t
val client_play_white: white_card -> unit Deferred.t
val client_judge: white_card -> unit Deferred.t
val client_get_user_state: unit -> state Deferred.t
(*pause the game*)
val client_pause: unit -> unit Deferred.t
(*resume the game(start game timer)*)
val client_resume: unit -> unit Deferred.t
(*play_white allows a user to play a card*)
val play_white: uID -> white_card -> unit Deferred.t
(*judge allows a user to select the winner of a round if he is the judge*)
val judge: uID -> white_card -> unit Deferred.t
(*get_user_state returns the state of the user*)
val get_user_state: uID -> state Deferred.t
(*check_heartbeat returns false if the heartbeat ever fails*)
(* No longer needed because of the addition of heartbeat.mli*)
(* val check_heartbeat: uID -> bool *)
val trigger_start: unit -> unit Deferred.t
val current_id: unit -> uID