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

Is is possible to check special moves? #52

Closed
9acca9 opened this issue Sep 22, 2024 · 3 comments
Closed

Is is possible to check special moves? #52

9acca9 opened this issue Sep 22, 2024 · 3 comments

Comments

@9acca9
Copy link

9acca9 commented Sep 22, 2024

Hi.
Sorry the ignorance.
I made a little app in python using python-chess (a module to chess validation move), with this module you can ask if certain moves are "en passant", "castling", "promotion".
For example:

if chess_board.is_castling(move): 
      do...

if move is a move that is castling the if will be true

Now im trying to replicate my app but with Java... (im trying to learn java...)
It is possible to know if this moves are happening with your library?

Thanks!

@ctabin
Copy link
Owner

ctabin commented Sep 23, 2024

Hi @9acca9,

I'm afraid there is no such simple method to do that. I might consider adding this.
For now, one simple way to check if a move is "special", is to check if there are linked displacement. If it is a King or Rook, then it's a castling move.

@corlaez
Copy link
Contributor

corlaez commented Jan 12, 2025

Yeah, it is possible but you would have to do it manually. No convenient methods like you described, @9acca9

@9acca9
Copy link
Author

9acca9 commented Jan 27, 2025

Thank you very much.

@9acca9 9acca9 closed this as completed Jan 27, 2025
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