A react color tile swap game! Inspired by Color Puzzle and I Love Hue.
- Pull down project.
- Run
npm installornpm ci - Start app with
npm run dev. - Go to
http://localhost:1234in your browser to view the app.
Run npm run add:game to add a new puzzle. The script will prompt for:
- puzzle name
- slug (optional; generated from the name if left blank)
- four corner colors as hex values
The script computes a raw numeric difficultyScore from the color distances and appends the new entry to data/game-boards.json.
The scoring model is documented in docs/difficulty-scoring.md.
This repo is configured to deploy to GitHub Pages from GitHub Actions.
- In GitHub repo settings, set Pages to use
GitHub Actionsas the source. - Push to
mainto run tests, build the static site, and deploy it.
The build writes static assets to docs/ and also creates docs/404.html so direct links like /game/{slug} can fall back to the app on GitHub Pages.
The post-build metadata generator uses SITE_ORIGIN when it writes canonical URLs, route-specific share pages, and the sitemap. It defaults to https://spasticninja.github.io/color-swap, but you can override it for another host.
- 9 x 10 game board
- color gradient tiles
- select, swap or unselect actions
- generator & randomizer
- selected icon
- make selected color box more obvious
- Add swap icon
- game routing to different boards
- save game to localStorage to persist game
- Clear state and refresh bug
- Undo (1 level)
- Hints
- Add streak counter
- Start screen will either randomly select game on intial start or allow them to continue playing (if game in localStorage)
- win screen love - make prettier and linkable?
- share & next game selection
- allow for different difficulties (game size?)
- Make pre-determined games so we can link to different ones?
- Choose game by color swatch (secret mode)
- Icons: IconMonstr
- Color Generator:
- mostly from: Canva
- random choices by me