react-chessboard-expandable
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

React Chessboard Expandable

This is a fork of the react chessboard project which supports an expandable chessboard. It supports a new fen, I have horribly named modified fen which supports this expandable chessboard requirement

Modified FEN

I have introduced a FEN string modification to support my requirement of an expanding board.

Requirements

  • The board should be able to expand from the original 8x8 board 1 square at a time
  • Pieces should be able to occupy any of the newly created squares

Solution

Normal FEN looks like this

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR

I have introduced a few new special characters

Character Description
# This character should show up at the starting of the row defining the 8th rank
$ This character should show up before the character on the a file
E This character simply a non existent square. The purpose of this character is to disambiguate square with no piece and empty space

Examples

Board with 1 row as the 9th rank

8/#rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR

Board with 1 row as the 0th rank

#rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR/8

Board with a file before the a file

#1$rnbqkbnr/1$pppppppp/1$8/1$8/1$8/1$8/1$PPPPPPPP/1$RNBQKBNR

Board with a file after the h file

#$rnbqkbnr1/$pppppppp1/$9/$9/$9/$9/$PPPPPPPP1/$RNBQKBNR1

Board with a few squares added on top of 8th rank

2EEEEE1/#rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR

Note

I know its a horrible name, I should have named it something like expandFen or fenPlus, but I am too lazy to change all occurances of it in my code.

Package Sidebar

Install

npm i react-chessboard-expandable

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

559 kB

Total Files

27

Last publish

Collaborators

  • naseer2426