ankith26 / My-PyChess

A Multiplayer / SinglePlayer / Online Chess Game app written in Python using Pygame Library
MIT License
88 stars 42 forks source link

How do i make a castling? #2

Closed Paralullus closed 4 years ago

Paralullus commented 4 years ago

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.

ankith26 commented 4 years ago

Just use the normal controls and click the square you want to castle.

ankith26 commented 4 years ago

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.

Paralullus commented 4 years ago

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.

ankith26 commented 4 years ago

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.

ankith26 commented 4 years ago

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