shaack / cm-chessboard

A JavaScript chessboard without dependencies. Rendered in SVG, coded in ES6. Views FEN, handles move input, animated, responsive, expandable
MIT License
216 stars 68 forks source link

Example code for local play #133

Closed ezz3r closed 8 months ago

ezz3r commented 8 months ago

Hello guys i am having a hard time with JavaScript, so I wanted to ask if someone could provide me an example code for an valid input. So only the moving, not the switching between players etc.

ezz3r commented 8 months ago

I just need an valid move input independent on the piece color moving. I tried to understand by reading the code in "validate-moves.html" example but i can't understand it or get it work with my idea. So would be nice if you could help me

shaack commented 8 months ago

In that case, you have to learn JavaScript first. This is the wrong place for such a base level support.