halfblindchessground
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

halfblindchessground

Fork of https://github.com/lichess-org/chessground.

There is a piece of new config/state:

halfBlindMove?: HalfBlindMove | number; // half-blind move on the board or number of moves until the next

This state must be controlled by the user in the events.after function, like so:

function afterExample(orig, dest) {
  const move = chess.move({ from: orig, to: dest });
  cg.set({
    halfBlindMove: move.halfBlind
      ? move
      : typeof cg.state.halfBlindMove === "number"
        ? cg.state.halfBlindMove - 1
        : 1
  });
  // ...
}

Half-blind pieces are marked with opacity.

Package Sidebar

Install

npm i halfblindchessground

Weekly Downloads

0

Version

0.1.1

License

ISC

Unpacked Size

311 kB

Total Files

90

Last publish

Collaborators

  • benchaplin