mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-04 16:46:46 +02:00
Add networking to game engine / add multiplayer chess
This commit is contained in:
@ -25,6 +25,20 @@
|
||||
|
||||
#include "game_base.h"
|
||||
|
||||
int chess_initialize(GameData *game);
|
||||
/*
|
||||
* Initializes chess game state.
|
||||
*
|
||||
* If `init_data` is non-null, this indicates that we were invited to the game.
|
||||
*
|
||||
* If we're the inviter, we send an invite packet after initialization. If we're the
|
||||
* invitee, we send a handshake response packet to the inviter.
|
||||
*
|
||||
* Return 0 on success.
|
||||
* Return -1 if window is too small.
|
||||
* Return -2 on network related error.
|
||||
* Return -3 on other error.
|
||||
*/
|
||||
int chess_initialize(GameData *game, const uint8_t *init_data, size_t length);
|
||||
|
||||
#endif // GAME_CHESS
|
||||
|
||||
|
Reference in New Issue
Block a user