+
Skip to content

maconard/shogiops

 
 

Repository files navigation

shogiops

Test npm

Shogi and operations in TypeScript forked from chessops, rewritten for shogi.

Features

  • Read and write SFEN
  • Vocabulary (Square, SquareSet, Color, Role, Piece, Board, Position)
  • Shogi
    • Move/drop making
    • Legal move and drop move generation
    • Game end and outcome
    • Setup validation
  • Attacks and rays using hyperbola quintessence
  • Read and write USI, Japanese, Western and Kitao-Kawasaki notation
  • Read and write KIF and CSA notation
  • Currently supported variants - shogi, minishogi, chushogi, annan shogi and kyoto shogi.
  • Compatibility with shogiground
  • Compatibility with lishogi

File an issue to request more or report a bug.

Example

Test directory has a lot of examples and use-cases.

import { Shogi } from 'shogiops/shogi';
import { parseUsi } from 'shogiops/util';

const pos = Shogi.default();
const usi = parseUsi('7g7f')!;
pos.play(usi);

License

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

About

Shogi rules and operations in TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载