nightmoves

Okay, so not really. Bob Seger once had a hit called “Night moves” which is what I just added to my picoEngine: knight moves. As always, you can check through the whole commit on my GitLab. Once again, I borrowed from my Java engine, justchess engine but had to do quite a bit of work to convert this method into C++. For instance, in Java, I make an array, but in C++ I had to set up a vector.

Overall, the code is cleaner and more compact for C++ than it was for Java. I’m not sure if it is because I am getting better, or just the language differences, but I’ll take it! I’m still a bit fuzzy about comparing signed and unsigned commits, so I have to keep editing my loops like so:

for(int l=0; (unsigned)l<theseMoves.size();l++) {

Making sure to put the parenthesis and unsigned before the integer. But, it seems to work, so I’ll go with that for now, perhaps later I can study up on it a bit more and see why this is needed.

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *