Here is a fun math game, inspired by the game "24", where you have to make mental calculation to obtain a target number with only the 4 integers given to you.

You can use parenthesis and standard operators (+,-,*,/) to get to the result.

Good luck!

The fun part in this cartridge is the calculator which includes a parsing Shunting-yard algorithm to generate and evaluate an RPN expression.

1.4 Update :

- Fix an issue when there was still numbers on the stack when evaluating an expression (like "829" evaluated to "9", instead of giving an error)

1.3 Update :

- Button X deletes the last character
- The delete button is replaced by a "c" (like in a calculator) to reset the guess

1.2 Update :

- Fixed a bug with the shunting yard algorithm (the test for operator precedence was incorrect)
- Added a debug/test mode for RPN calculation (set the scene=2)

1.1 Update :

- Score, timer and difficulty indicator
- Fireworks when a correct solution is guessed (from the Fireworks effects by Saccharine)
- Some invalid calculations are detected (not all)
- Fixed some other bugs

Hey. This is an awesome idea. But shouldn't this one be correct?

That reads as 8 - 2 - (5/5) = 6 - 1 = 5 to me. Shouldn't it be 8 - (2 - 5/5)?

I haven't done this type of problem in years, it's more fun than I remember - great work :)

However, one of the buttons (z or x, don't remember which) 'skips' the current question.

Maybe add a confirmation prompt before doing that - being halfway through entering a solution and losing it all due to an errant keystroke kind of put me off a little.

@Catatafish Thanks, I have great fun playing it too with my kids!

I removed the ability to skip a problem in the last version (1.2).

You now have 60 to 80 seconds to solve a problem, after that it displays the solution and you can get a new one.

I noticed a strange behaviour, if you type multiple numbers directly after one another without any operator only the first number is evaluated. for example 11 + 8 + 2 = 11

Anyway, really like this one, way more fun than I thought it would be :)

[Please log in to post a comment]