Skip to content

ethmarks/hadronize

Repository files navigation

Hadronize

Demo GitHub

Quark-themed set collection game you can play in your browser.

Hadronize banner

Quickstart

Tip

The recommended starting point is https://ethmarks.github.io/hadronize/how.

If you'd like to jump right in without reading the rules or instructions, you can either visit https://ethmarks.github.io/hadronize/play to play in your browser, or you can run the following command to play in your terminal:

npx deno run -A http://ethmarks.github.io/hadronize/cli.ts

Features

  • Layout optimization engine: The Hadronize web UI uses a custom layout algorithm to ensure that all elements remain visible and readable on all screen sizes, using a virtual layout plan and an escalating series of compromises for small screens and high element counts. This lets the web UI work seamlessly on desktop, mobile, and any browser environment without using hardcoded breakpoints.
  • User-created bots: Players can be controlled by bots whose source code can be altered on-the-fly at runtime in the bot editor.
  • CLI that also works in the browser console: The Hadronize CLI can run in Node, Deno, Bun, and the browser console. The first three required making the entire codebase a polyglot that only uses the subset of TypeScript that both Node and Deno support without a compatibility layer. To make the browser console accept user input, I used a trick involving dynamically created named window properties.
  • Comprehensive test suite: 120 total unit tests that verify that the game logic is implemented correctly and detect regressions.
  • Easy onboarding: How to play page that explains how the rules and how to use the UI in 3-4 minutes assuming zero knowledge.

Acknowledgements

License

This project is under an MIT License. See LICENSE for more information.

About

Quark-themed set collection game you can play in your browser

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors