Skip to content

Indroduce new Piece on board #75

Discussion options

You must be logged in to vote

Well that's an easy one! You just need PieceType.fromBetza('') (actually you could do it with the basic constructor but for a number of reasons I recommend sticking with fromBetza). You probably also don't want to promote to this piece I guess.

So your variant probably looks something like this:

final govindChess = Variant.standard().withPieces({
    'S': PieceType.fromBetza('', promoOptions: PiecePromoOptions.none),
  }).copyWith(
    name: 'Your Variant Name',
    startPosition:
        'rnbqkbnr/pppppppp/8/2ssss2/2SSSS2/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1',
  );

Just included the start position as an example to show you how to do it.
Another thing you might want is to set materialConditio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by govind-maheshwari2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants