Hexidecimal Math Game

I made a (quick) game to practice Hexidecimal addition and figured I’d share here:

The game itself - HexMath
Source - GitHub - matt-savvy/hex_math: Game to Practice Hexidecimal Math

Wrote this in basically two sittings - one to make the game itself and one to actually handle the styling + css.

Found some good excuses to play with fuzz tests - for example, when converting from an integer to a hexidecimal, I know that any integer in a certain range is going to be a certain amount of digits:

fuzz (intRange 16 255) "16-255 is two digits" <|
  \n -> Expect.equal (String.length (toHex n)) 2

Shout out to @isaacvando for sharing elm-to-gh-pages - it worked like a charm.

6 Likes

This is a great idea! I think I improved my skills significantly just from doing 5 or so problems :smiley:.

Glad to hear that the GitHub actions workflow worked well for you!

This is a great idea!

Reading a book about assembly and it suggested practicing hex addition. I was surprised when I couldn’t find any simple programs like this.

Glad to hear that the GitHub actions workflow worked well for you!

I think this is the perfect kind of project for it - a simple, self contained (as in, frontend-only) app.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.