Newer
Older
package proto;
enum Role {
ROLE_UNDEFINED = 0;
CLIENT = 1;
SERVER = 2;
}
message Identity {
Role role = 1;
}
message LoginRequest {
string username = 1;
string password = 2;
}
enum MatchType {
MATCH_UNDEFINED = 0;
NO_MATCH = 1;
MATCH = 2;
EXACT_MATCH = 3;
message NewWord {
string lastWord = 1;
}
enum MessageType {
UNDEFINED = 0;
IDENTITY = 1;
LOGIN_REQUEST = 2;
LOGIN_RESPONSE = 3;
GUESS_REQUEST = 4;
GUESS_RESPONSE = 5;
NEW_WORD = 6;
}
message Message {
MessageType type = 1;
google.protobuf.Any msg = 2;
}
message GameStateStore {
repeated string guesses = 1;
string word = 2;
}
message PlayerStore {
string username = 1;
string hashedPw = 2;
GameStateStore state = 3;