kingsafe

Except he’s not. That’s right. I big technical oversight on my part allowed the king to not be safe at all!

while (boardPositions[k] == ‘*’ && notI) {

Needed to be changed to:

while (boardPositions[k] == ‘-‘ && notI) {

That’s right! A – is what my board uses for empty spaces. But the Java board I wrote for JustChessEngine used an * instead. I guess I got confused when looking at the code and put it in the wrong way! Too much copy and paste from my Java work I suppose. Either way, the king is safer now!

Linux – keep it simple.

Leave a Reply

Your email address will not be published.