Got it! Now blocks, checks, pins, and captures work. Everything works. The only missing thing is chastling wich might be a bit tricky to implement. The way the code works now, is the following:
- Every possable move from a piece gets calculated
- Every possition after the move gets looked at
- If the king is attacked in any possition delet the move from the possable moves.
This may not ultimatle be the fasters way, but it’s fast enough for now. I might implement a even faster algorithem in the futur, but I like this one because it is just so clean and readable.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.