js-solitaire icon indicating copy to clipboard operation
js-solitaire copied to clipboard

Interested in Improvements? :)

Open 1j01 opened this issue 4 years ago • 1 comments
trafficstars

Hello! I've added your project to my web desktop 98.js.org, and I've made several improvements:

  • Use all graphics from the original Solitaire game, including card backs, chosen at random
  • Use a proper shuffling algorithm. Fisher-Yates shuffle gives a uniform distribution, whereas the sort() does not.
  • Handle different window sizes, and improve the layout of staggered cards
  • Added app menus using my os-gui library
  • Cleaned up and simplified some code.
  • Perhaps most contentiously, I removed all the compilation toolchain. Instead of webpack-dev-server, I just use live-server for a nice development workflow. Instead of the SCSS loop for background-positions of different cards, I added CSS variables via JS, and reused a loop over all cards.

I can port these improvements back to your project if you like.

1j01 avatar Mar 31 '21 05:03 1j01

Thanks for the project, by the way! As soon as I saw it was open sourced, I started working on adding it.

I can port any of these improvements separately, just let me know which if any you're interested in.

The modified code is available here, and a history of changes as well.

1j01 avatar Jun 10 '21 14:06 1j01