Autumn Green
Autumn Green
Did you find a workaround for this? I suffer from the same isue.
I need this so bad. I made a game that is based around select undefended pieces and I have isAttacked to see if a piece is defended, but I need...
Whoops, deleted my post before seeing the response. There was a ton of bugs in it. List of attacking squares would be perfect. I think attackers are only ones that...
The problem with this is that defending is not a valid move unless there is a capture. ```typescript function getAttackers(chess, square: string, color: string) { const attackers = Array.from(ALL_SQUARES).filter((attackerSquare) =>...
I am not concerned with captures, just defenders. I'm expecting "attackers" to return white attacking itself if specified by color
Essentially I want the contract for isAttacked where I can choose the color and therefore can use it to detect defenders. This is what I'm working on: https://tactical-elements.netlify.app/
It's a slice of chess history, whether silly and ephemeral or not.
> I won't be able to provide a specific example from the top of my head, but in our https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions solution, gremlins.js found bugs many times before. In our other...
Workaround is to install the Github version: ```bash npm install chess.js@https://github.com/jhlywa/chess.js ```
@neofight78 Can be closed