Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interested in Improvements? :) #8

Open
1j01 opened this issue Mar 31, 2021 · 1 comment
Open

Interested in Improvements? :) #8

1j01 opened this issue Mar 31, 2021 · 1 comment

Comments

@1j01
Copy link

1j01 commented Mar 31, 2021

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
Copy link
Author

1j01 commented Jun 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant