Closed Paralullus closed 4 years ago
Just use the normal controls and click the square you want to castle.
But you must remember the rules to castle: 1 The king must not be in check 2 The squares in between the king should be empty 3 The path that king takes should also not be checked by opponent 4 Neither the king nor the rook should have moved before.
for the algorithm of a game you can got to http://inventwithpython.com/invent4thed/chapter10.html, its for tic tac toe, but maybe helpful to study. For now your chess works graphic good looking, but plays like a dump child . What is funny , just the first minutes.
Yes, I did mention that it is a RANDOM MOVE generator and that it’s difficulty level is for EXTREME BEGINNERS. I am currently working on the next version that includes better levels of difficulty. In the meantime, you try multiplayer chess with someone.
Your tic tac toe link has a rudimentary algorithm that cannot be implemented on chess as chess is way more complex than tic tac toe. What I am currently working on is called MINIMAX ALGORITHM (WITH ALPHA-BETA PRUNING OPTIMISER) This a good start for a chess AI
How do i make a castling? I could not find out. If not possible you have to tell me that, please. In a pic i have seen, kings move in red points start and landing place and arrow , tower in green.