This would be an interesting challenge because it is pretty complicated managing all the cards and stacks (so 5+ parts :-)). On the other hand, it teaches a lot about modern OOP in JavaScript, collision detection, and array manipulation/higher-order functions.
I have implemented this in p5 using some HTML/CSS and ES6 syntax. Just a short note: my code includes a lot of stuff not necessary to core gameplay (automatic language apply, guide, cross-platform input etc.), so you might want to ignore that.
Page: https://rawgit.com/kleinesfilmroellchen/Solitaire/master/index.html
Source: https://github.com/kleinesfilmroellchen/Solitaire/tree/master
This would be an interesting challenge because it is pretty complicated managing all the cards and stacks (so 5+ parts :-)). On the other hand, it teaches a lot about modern OOP in JavaScript, collision detection, and array manipulation/higher-order functions.
I have implemented this in p5 using some HTML/CSS and ES6 syntax. Just a short note: my code includes a lot of stuff not necessary to core gameplay (automatic language apply, guide, cross-platform input etc.), so you might want to ignore that.