Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to show the (just-) captured piece on the chess board #298

Open
hb20007 opened this issue Apr 10, 2024 · 1 comment
Open

Add option to show the (just-) captured piece on the chess board #298

hb20007 opened this issue Apr 10, 2024 · 1 comment

Comments

@hb20007
Copy link

hb20007 commented Apr 10, 2024

Recently, an image of a chess position was shared on Chess Stack Exchange where the captured piece was shown on the board in a useful and interesting way, which led to many people wondering about what software was used to create it.

image

In the end, it seems that the image was simply edited for this effect, but it would be great to add this feature to chessground as a toggleable display setting.

It might be challenging to find the right CSS that would work with all piece sets, and there might also be difficulties in implementing this for edge squares. However, this feature is useful for remembering what piece was captured, and also taking screenshots of positions to quickly share on forums or social media is fairly common.

@hjonasson
Copy link

hjonasson commented Apr 24, 2024

I like this idea. I wrote up a small change to demo it. On my branch it looks like this

image

I use the highlight.custom API to get it to work. @schlawg or any other maintainers, if I spend a few hours on polishing my branch would you consider merging it? I would make it an opt-in feature and not a default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants