You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. user-error - {general errors}
2. game-error - {errors specific to ongoing game}
Format :-
{
title: "",
msg: "",
buttonText: "",
redirectTo: ""
}
Game-Events
1. color - {sending piece color to player}
Format :-
color: ""
2. players-info - {sending information of players to room}
Format :-
[{
id: "",
color: "",
username: "",
photo: ""
}]
3. winner - {sending the winner of the game to the room}
Format :-
winner: "" (color of the piece)
4. draw-offered
Format :-
5. draw-accepted
Format :-
6. draw-rejected
Format :-
7. end-game - {ends the game and makes the players & spectators leave the board}
Format :-
8. head-count - {sending the count of people in the room}
Format :- roomSocketCnt
Game-Status-Events
1. games - {sends list of all ongoing games, except bot games}
Format :-
[{
id: "",
playerCount: __
}]
2. game-status - {sends the current state of board after each move}
Format :-
{
id: "",
board: [][]
turn: ""
}
3. ongoing-game - {sends the ongoing game user is a player of}
Format :-
{
id: "",
turn: "",
players: [{}]
}
User-Status-Events
1. user-status - {sends the status of online friends or users}
Format :-
{
userId,
status,
gameId - {only when user is in game}
}
USER STATUS : ["IDLE", "IN_LOBBY", "IN_GAME"]