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

castling #27

Open
Foodie947 opened this issue Sep 10, 2024 · 3 comments
Open

castling #27

Foodie947 opened this issue Sep 10, 2024 · 3 comments

Comments

@Foodie947
Copy link

Describe the bug
castling is cursed

To Reproduce
Steps to reproduce the behavior:
go to any website, move your king, move back to e1
then sometimes it will recommend castling

Expected behavior
dont recommend castling after you moved your king

Screenshots
no

Desktop (please complete the following information):

  • OS: win 10
  • Browser violentmonkey, chrome
  • Version 128.0.6613.120 64 bit

Additional context
random sidenote: animations arent supported on chess.com

@Hakorr
Copy link
Collaborator

Hakorr commented Sep 30, 2024

Will probably not make a fix for this for now, but will keep the issue active.

@thug-shaker
Copy link

thug-shaker commented Jan 17, 2025

Will probably not make a fix for this for now, but will keep the issue active.

You can easily fix this for chess.com.
Chess.com has a custom element tag for the board wc-chess-board, you can get objects with this tag by for example doing: let board = document.getElementsByTagName("wc-chess-board")[0];
To get the first such element.

The custom element has a game property which contains functionality for getting the FEN.
In my custom cheat I do the following to get the FEN (This contains accurate castling rights).
let board = document.getElementsByTagName("wc-chess-board")[0]; const game = board.game; const fen = game.getFEN();

@Hakorr
Copy link
Collaborator

Hakorr commented Jan 19, 2025

Will probably not make a fix for this for now, but will keep the issue active.

You can easily fix this for chess.com. Chess.com has a custom element tag for the board wc-chess-board, you can get objects with this tag by for example doing: let board = document.getElementsByTagName("wc-chess-board")[0]; To get the first such element.

The custom element has a game property which contains functionality for getting the FEN. In my custom cheat I do the following to get the FEN (This contains accurate castling rights). let board = document.getElementsByTagName("wc-chess-board")[0]; const game = board.game; const fen = game.getFEN();

I know about that but it is easily detectable by Chess.com if they ever decide to add detection to it, and it's not an universal solution. I will rather implement my own castling rights detection which is universal.

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

3 participants