Skip to content

benchaplin/halfblindchessground

 
 

Repository files navigation

halfblindchessground

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

Installation

To install the stable version:

# npm
npm install halfblindchessground

# yarn
yarn add halfblindchessground

Usage

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 can be controlled by the user in the events.after function, like so:

function afterExample(orig, dest) {
  const move = halfBlindChess.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.

About

Chess board UI for half-blind chess variant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.6%
  • CSS 5.7%
  • Other 1.7%