Heelllooo!!!
I know this is going to be something pretty big…
I am about to start a chess library, users will be able to upload their games.
But, due to the language and typos I find better (harder to code I know, but in the end simply better) to restrict the chances the user has to mess up by putting a chess board on the screen and tell the user “move the pieces as it happened in the game”, internally I will handle everything else.
Here is where I need as much assistance as I can get.
Should I draw the board using a table and populate it with the images at their corresponding initial position? (If you have a better solution please tell me)
how then would I:
-Capture the clicks and know that they belong to a specific square?
-“Move” the image from square to square?
-And most importantly, check if the move is a valid one?
I know how to play chess, but Im not sure (actually im pretty lost here ? ) how to do these things…
Thank you very much, really, anything that you can help me with will be awsome!.
I dont know if any of you plays chess or has visited [url]www.letsplaychess.com
btw: I should store the moves in a JS variable so later on, when the user has finished, and it clicks ‘Add to library’, those moves are sent to a PHP page which puts them in a database…