-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.proto
72 lines (64 loc) · 1.44 KB
/
types.proto
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright © 2019 Free Chess Club <[email protected]>
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
syntax = 'proto3';
package icsgo;
option go_package = "./icsgo";
// channel tell
message ChannelTell {
// channel name
string channel = 1;
// user who made the tell
string user = 2;
// message / body of the tell
string message = 3;
}
// private tell
message PrivateTell {
// user who made the tell
string user = 1;
// message / body of the tell
string message = 2;
}
// a game start message
message GameStart {
// id of the game that was started
uint32 game_id = 1;
// handle of player one
string player_one = 2;
// handle of player two
string player_two = 3;
}
// a game end message
message GameEnd {
// id of the game that was ended
uint32 game_id = 1;
// user who won the game, if it wasn't a draw
string winner = 2;
// handle of the user who lost the game, if it wasn't a draw
string loser = 3;
// reason for game end
uint32 reason = 4;
// message associated with the game result
string message = 5;
}
// a game move message
message GameMove {
string fen = 1;
string turn = 2;
uint32 game_id = 3;
string white_name = 4;
string black_name = 5;
int32 role = 6;
uint32 time = 7;
uint32 inc = 8;
uint32 white_time = 9;
uint32 black_time = 10;
uint32 move_no = 11;
string move = 12;
}
// a generic message from the server
message Message {
string message = 1;
}