返回排行榜

jhlywa/chess.js

TypeScriptjhlywa.github.io/chess.js/

A TypeScript chess library for chess move generation/validation, piece placement/movement, and check/checkmate/draw detection

chess
Star 增长趋势
Star
4.4k
Forks
985
周增长
Issues
25
2k4k
2011年3月2016年4月2021年6月2026年7月
制品库npmnpm install chess.js
README

logo

chess.js

GitHub Workflow Status npm npm

chess.js is a TypeScript chess library used for chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection - basically everything but the AI.

chess.js has been extensively tested in node.js and most modern browsers.

Documentation

This README provides a quick example, full documentation can be found at https://jhlywa.github.io/chess.js.

Installation

Run the following command to install the most recent version of chess.js from NPM:

npm install chess.js

Example Code

The code below plays a random game of chess:

import { Chess } from 'chess.js'

const chess = new Chess()

while (!chess.isGameOver()) {
  const moves = chess.moves()
  const move = moves[Math.floor(Math.random() * moves.length)]
  chess.move(move)
}
console.log(chess.pgn())

Contributing

If you have any questions, suggestions, or find any bugs please open an issue. PRs are very welcome too, please read the Contributing Guide first to help make it a smooth process.

相关仓库
lichess-org/lila

♞ lichess.org: the forever free, adless and open source chess server ♞

ScalaGNU Affero General Public License v3.0scalachess
lichess.org
18.5k2.7k
official-stockfish/Stockfish

A free and strong UCI chess engine

C++GNU General Public License v3.0chesschess-engine
stockfishchess.org
16.1k3k
thomasahle/sunfish

Sunfish: a Python Chess Engine in 111 lines of code

PythonPyPIOthersunfishpython
chessprogramming.org/Sunfish
3.3k582
LeelaChessZero/lc0

Open source neural network chess engine with GPU acceleration and broad hardware support.

C++GNU General Public License v3.0alphazero-inspiredchess
lczero.org
3.2k600
niklasf/python-chess

A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication

PythonPyPIGNU General Public License v3.0chessfen
python-chess.readthedocs.io/en/latest/
2.8k574
lichess-org/mobile

Lichess mobile app

DartGNU General Public License v3.0androidchess
2.4k453
Zeta36/chess-alpha-zero

Chess reinforcement learning by AlphaGo Zero methods.

Jupyter NotebookMIT Licensereinforcement-learningkeras
2.2k472
lichess-org/lichobile

lichess.org former mobile application / new one -> github.com/lichess-org/mobile

TypeScriptnpmGNU General Public License v3.0lichessstockfish
lichess.org/mobile
2.2k328
FreezingMoon/AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺

TypeScriptnpmGNU Affero General Public License v3.0gamejavascript
ancientbeast.com
1.9k698
franciscoBSalgueiro/en-croissant

The Ultimate Chess Toolkit

TypeScriptnpmGNU General Public License v3.0chesschess-database
encroissant.org
1.7k281
RonSijm/ButtFish

Effortlessly transmitting Morse Code of chess moves to your butthole 💝

C#buttplugchess
1.5k28
lichess-org/chessground

Mobile/Web chess UI for lichess.org

TypeScriptnpmGNU General Public License v3.0lichesschess
lichess.org
1.3k324