1.1.4 • Published 3 years ago

tschess v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Chess API written in typescript for chessishard.com

It is entirely functional, immutable, and free of side effects.

Based on Scala Chess.

Install

`yarn add tschess --save`
 import { ts, // types
    actor, // actor
    move, // move
    dir, // direction
    disp, // displace
    dt, // dtypes
    board, // board
    san, // san
    uci, // uci
} from 'tschess';

Api

See index.ts for exported names.

Move with San

    import { nt, f, m, san, tssan } from 'tschess';

    // export function moveOrCastle(sanOrCastle: nt.SanMetaOrCastles, situation: nt.Situation): nt.Maybe<tt.Move>;

    let e4 = tssan.moveOrCastle(san.str2meta('e4')!, f.situation(nt.initialFen)!)!;

    f.fen(m.situationAfter(e4)) // returns fen after e4 move.

Move with Uci

Similar functions for Uci type.

1.1.1

3 years ago

1.1.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago