All Projects → niklasf → chessops

niklasf / chessops

Licence: GPL-3.0 license
Chess and chess variant rules and operations in TypeScript

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to chessops

lila-tablebase
Tablebase server
Stars: ✭ 51 (-22.73%)
Mutual labels:  chess, lichess
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞
Stars: ✭ 10,315 (+15528.79%)
Mutual labels:  chess, lichess
liground
A free, open-source and modern Chess Variant Analysis GUI for the 21st century
Stars: ✭ 41 (-37.88%)
Mutual labels:  chess, lichess
ChessLib
C# chess library containing a complete data structure and move generation.
Stars: ✭ 37 (-43.94%)
Mutual labels:  chess, fen
lila-openingexplorer
Opening explorer for lichess.org that can handle all the variants and billions of unique positions
Stars: ✭ 89 (+34.85%)
Mutual labels:  chess, lichess
should-i-play-f6
Chess project to analyze the statistical effect of playing f3 (as white) or f6 (as black) on the outcome of the game.
Stars: ✭ 15 (-77.27%)
Mutual labels:  chess, lichess
bot-o-tron
Try out lichess' bot interface
Stars: ✭ 36 (-45.45%)
Mutual labels:  chess, lichess
lila-gif
Webservice to render Gifs of chess positions and games, and stream them frame by frame
Stars: ✭ 63 (-4.55%)
Mutual labels:  chess, lichess
pgn-tactics-generator
Generate chess puzzles / tactics from a pgn file
Stars: ✭ 83 (+25.76%)
Mutual labels:  chess, lichess
liPGN
This program uses the lichess REST API to retrieve all the games of a user and transform them into a big PGN file that you can then import into your favourite game analysis tool (ie. scid)
Stars: ✭ 14 (-78.79%)
Mutual labels:  chess, lichess
chessground
Chessground React Wrapper
Stars: ✭ 15 (-77.27%)
Mutual labels:  chess, lichess
kokopu
A JavaScript/TypeScript library implementing the chess game rules and providing tools to read/write the standard chess file formats.
Stars: ✭ 18 (-72.73%)
Mutual labels:  chess, fen
php-chess
A chess library for PHP.
Stars: ✭ 42 (-36.36%)
Mutual labels:  chess, fen
chess-openings
An aggregated data set of chess opening names
Stars: ✭ 223 (+237.88%)
Mutual labels:  chess, lichess
stockfish.js
The strong open source chess engine Stockfish compiled to JavaScript and WebAssembly using Emscripten
Stars: ✭ 140 (+112.12%)
Mutual labels:  chess, lichess
underwater-chess
Chess, written in React, driven by a Stockfish-powered API
Stars: ✭ 20 (-69.7%)
Mutual labels:  chess
Checkmate
A human vs human chess game build on basic JAVA.
Stars: ✭ 15 (-77.27%)
Mutual labels:  chess
chess
An R package to read, write, create and explore chess games
Stars: ✭ 60 (-9.09%)
Mutual labels:  chess
rustic
Rustic is a chess engine. It is written from scratch, in the Rust programming language.
Stars: ✭ 68 (+3.03%)
Mutual labels:  chess
ChineseChessOnline
一款canvas版中国象棋游戏,支持高清图像/canvas响应式设计/ 实时对战/棋谱功能/在线聊天。A Canvas version of the Chinese chess game, supporting high-definition images / Canvas responsive design / real-time combat / chess spectrum function / online chat
Stars: ✭ 25 (-62.12%)
Mutual labels:  chess

chessops

Test npm

Chess and chess variant rules and operations in TypeScript.

Documentation

View TypeDoc

Features

  • Read and write FEN
  • Vocabulary
    • Square
    • SquareSet (implemented as bitboards)
    • Color
    • Role (piece type)
    • Piece (Role and Color)
    • Board (map of piece positions)
    • Castles
    • Setup (a not necessarily legal position)
    • Position (base class for legal positions, Chess is a concrete implementation)
  • Variant rules: Standard chess, Crazyhouse, King of the Hill, Three-check, Antichess, Atomic, Horde, Racing Kings
    • Move making
    • Legal move and drop move generation
    • Game end and outcome
    • Insufficient material
    • Setup validation
  • Supports Chess960
  • Attacks and rays using hyperbola quintessence (faster to initialize than magic bitboards)
  • Read and write UCI move notation
  • Read and write SAN
  • Read and write PGN
    • Parser supports asynchronous streaming
    • Game tree model
    • Transform game tree to augment nodes with arbitrary user data
    • Parse comments with evaluations, clocks and shapes
  • Transformations: Mirroring and rotating
  • Compatibility: chessground and scalachess

File an issue to request more.

Example

import { parseFen } from 'chessops/fen';
import { Chess } from 'chessops/chess';

const setup = parseFen('r1bqkbnr/ppp2Qpp/2np4/4p3/2B1P3/8/PPPP1PPP/RNB1K1NR b KQkq - 0 4').unwrap();
const pos = Chess.fromSetup(setup).unwrap();
console.assert(pos.isCheckmate());

License

chessops is licensed under the GNU General Public License 3 or any later version at your choice. See LICENSE.txt for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].