@startuml

set separator ::

struct client::RequestNewGameMsg {
	int msgid = 1
}

struct client::RequestMoveMsg {
	int msgid = 2
	int direction
}

struct client::JoinGameMsg {
	int msgid = 3
	string gameid
	string nickname
	string password
}

struct client::LeaveGameMsg {
	int msgid = 4
	string gameid
}

struct server::GameStartedMsg {
	int msgid = 5
	string gameid
}

struct server::GameEndedMsg {
	int msgid = 6
	string gameid
}

struct server::PlayerJoinedMsg {
	int msgid = 7
	string gameid
	string nickname
}

struct server::PlayerLeftMsg {
	int msgid = 8
	string gameid
	string nickname
}

struct server::GameUpdateMsg {
	int msgid = 9
	string gameid
	int[][] localBoard // array of 100x100 centered on snake head
}

@enduml
