CheSSsk Library
Description
Still a WIP
A library for chess move validation based on location and board data.
- Set up new game
- Load game from database JSON string
- Export board data to JSON string for saving
- Get valid moves for pieces based on location
- Make only valid moves for pieces
- En passant
- King check and checkmate status updates
- Pawn exchange
Example Usage
-
Creating a new game and getting valid moves for a location
const chesssk = ;const game = ;game;let validMoves = game;console; -
Load a game from database, make a move, and get new grid data in json string
const chesssk = ;const game = ;game;let moveResult = game;let dbJsonStringToSave = game;// do database and client updates with moveResult object and new grid dataconsole;