AlaskaLinuxUser's Scratchpad

Commit thy works unto the LORD, and thy thoughts shall be established. - Proverbs 16:3

Added the ability to castle to the Beginner Chess Engine

For better or worse, I added the ability to castle to the Beginner Chess Engine.

device-2017-10-04-111213

In theory, that would always be better. However, adding this feature actually caused two problems:

Problem #1 - Even though the castle works great, as expected, and is successful, occasionally, on the NEXT move of the side that castled, then the rook can turn into a king.

Problem #2 - The king cannot castle in check, nor to check, but can currently castle across check, which is an illegal move.

Hmm.... back to the drawing board I guess. You can check out what I did by looking at the commits.

Linux - keep it simple.