This was the most frustrating error jet. Took me forever to figur out what even was going on. And I took me even longer fixing it. So what keept happening was this:
- Every time we look for a mate we simulate all of the opponents moves
- If a pawn on the second or seventh rankt(one square away from queening) was just sitting idle the programm simulated the promotion
- Because the promotion was just a simple scanf the complete programm came to a halt.
To fix this I have implemented a way to queen as user and also, one for the Bot, later down the line. Although the bot one only queens for now. I am not sure jet if it is even nessecery to programm it to promot to any other piece, because it is almost never really the only winning idea.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.