insanichess_sdk library
Insanichess SDK library.
This library provides wrappers around core game classes from
insanichess
. Classes implemented
in this library can be used in client and server applications.
Classes
- DisbandedGameEvent
- Event that signals that white player did not make a move in the initial time period.
- DrawOfferCancelledGameEvent
- Event that signals a draw offer has been revoked. This event is not sent on the broadcast stream, therefore no need to have a player as a field here.
- DrawOfferedGameEvent
- Event that signals a draw offer. This event is not sent on the broadcast stream, therefore no need to have a player as a field here.
- DrawOfferRespondedGameEvent
- Event that a user accepted / declined a draw offer. The event does not contain data of who issued the request, because this is an internal event and is processed only on server side. It only contains whether the response is confirming the request or not.
- FlaggedGameEvent
- Event that can contains data on who flagged.
- ICServerRoute
- Holds route definitions.
- InsanichessChallenge
- Represents an issued challenge for a game.
- InsanichessChallengeJsonKey
-
Keys used in
InsanichessChallenge
json representations. - InsanichessConfig
- Holds configuration fields that both client and server need or share.
- InsanichessGame
- Contains all information about the game.
- InsanichessGameEvent
- Base class for game events.
- InsanichessGameEventJsonKey
- Provides keys for json representations of different InsanichessGameEvents.
- InsanichessGameJsonKey
-
Keys used in
InsanichessGame
json representations. - InsanichessGameSettings
- Model for game settings.
- InsanichessGameSettingsJsonKey
-
Keys used in
InsanichessOtbSettings
json representations. - InsanichessLiveGame
- Extends InsanichessGame with data that a server needs for bookkeeping and player's client needs to update UI accordingly.
- InsanichessLiveGameJsonKey
- Provides keys for json representations of InsanichessLiveGame.
- InsanichessLiveGameSettings
- Model for live game settings.
- InsanichessLiveGameSettingsJsonKey
-
Keys used in
InsanichessOtbSettings
json representations. - InsanichessOtbSettings
- Model for OTB settings.
- InsanichessOtbSettingsJsonKey
-
Keys used in
InsanichessOtbSettings
json representations. - InsanichessPlayer
- A player of the game.
- InsanichessPlayerJsonKey
-
Keys used in
InsanichessPlayer
json representations. - InsanichessSettings
- Model for all settings for the app.
- InsanichessSettingsJsonKey
-
Keys used in
InsanichessOtbSettings
json representations. - InsanichessTimeControl
- Represents a time control for a game.
- InsanichessTimeControlJsonKey
-
Keys used in
InsanichessTimeControl
json representations. - InsanichessUser
- Model representing base user info.
- InsanichessUserJsonKey
-
Keys used in
InsanichessUser
json representations. - InsanichessValidator
- Provides validation functions.
- MovePlayedGameEvent
- Event that contains data about the move that has been played.
- ResignedGameEvent
- Event that can contain data on who resigned. When a user sends this event to the server, player is empty and is acquired from JWT token. When server broadcasts this event, the player is included.
- UndoCancelledGameEvent
- Event that a user cancelled an undo request. The event does not contain data of who issued the request, because this is an internal event and is processed only on server side.
- UndoRequestedGameEvent
- Event that a user requested an undo. The event does not contain data of who issued the request, because this is an internal event and is processed only on server side.
- UndoRespondedGameEvent
- Event that a user accepted / declined an undo request. The event does not contain data of who issued the request, because this is an internal event and is processed only on server side. It only contains whether the response is confirming the request or not.
Enums
- AutoZoomOutOnMoveBehaviour
- Automatic board zoom-out behaviour after a move has been played.
- ChallengeStatus
- Status of the challenge.
- GameEventType
- The type of the game event. This is used to indicate what kind of data is in the request / response and to be able to efficiently parse the data.
Extensions
- AutoZoomOutOnMoveBehaviourExtension on AutoZoomOutOnMoveBehaviour
- Defines additional functions on AutoZoomOutOnMoveBehaviour.
- ChallengeStatusExtension on ChallengeStatus
- GameEventTypeExtension on GameEventType
- GameStatusExtension on GameStatus
- PieceColorExtension on PieceColor
-
Extends
insanichess.PieceColor
with additional functionality.
Functions
-
autoZoomOutOnMoveBehaviourFromJson(
int json) → AutoZoomOutOnMoveBehaviour -
Returns AutoZoomOutOnMoveBehaviour from
json
representation. -
challengeStatusFromJson(
int json) → ChallengeStatus -
gameEventTypeFromJson(
String json) → GameEventType -
gameStatusFromJson(
int json) → GameStatus -
pieceColorFromJson(
String json) → PieceColor -
Returns appropriate
insanichess.PieceColor
fromjson
representation. -
positionFromFen(
String fen) → Position