-
Notifications
You must be signed in to change notification settings - Fork 0
/
mafia_game.proto
57 lines (54 loc) · 1.53 KB
/
mafia_game.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
syntax = "proto3";
service Server {
rpc InstallName (NameRequest) returns (Reply) {}
rpc GetRoomId (EmptyRequest) returns (RoomResponse) {}
rpc GetStream (EmptyRequest) returns (stream Reply) {}
rpc StartTheGameRequest (EmptyRequest) returns (EmptyResponse) {}
rpc RoleAssignment (NameRequest) returns (Role) {}
rpc UsersInfo (NameRequest) returns (UsersInfoMessage) {}
rpc AccusePerson (AccuseRequest) returns (EmptyResponse) {}
rpc Exit (NameRequest) returns (EmptyResponse) {}
rpc KillPerson (NameRequest) returns (EmptyResponse) {}
rpc CheckPerson (NameRequest) returns (BoolReply) {}
rpc EndDayRequest (EmptyRequest) returns (Reply) {}
rpc EndNightRequest (EmptyRequest) returns (Reply) {}
rpc CleanAccusedRequest (EmptyRequest) returns (EmptyResponse) {}
rpc AnnounceMafia(AnnounceMafiaRequest) returns (EmptyResponse) {}
rpc CheckGameEnding (EmptyRequest) returns (BoolReply) {}
rpc GetVictims (NameRequest) returns (UsersInfoMessage) {}
}
message EmptyResponse {}
message EmptyRequest {
int64 room_id = 1;
}
message RoomResponse {
int64 room_id = 1;
bool validation = 2;
}
message AnnounceMafiaRequest {
bool permission = 1;
int64 room_id = 2;
}
message NameRequest {
string name = 1;
int64 room_id = 2;
}
message AccuseRequest {
string username = 1;
string name = 2;
int64 room_id = 3;
}
message Role {
string role = 1;
}
message UsersInfoMessage {
string names = 1;
string statuses = 2;
}
message Reply {
string message = 1;
}
message BoolReply {
string message = 1;
bool right = 2;
}