Repository navigation
feat: US currency subtraction problems ($a − $b) for Grade 2+ - #36
Merged
Merged
Conversation
Adds a 'subtract' mode to genCurrency alongside count/add/change: same ranges as add (cents 5–50 for G2, 5–999 for G3+), operands swapped so the difference is always positive, trivial n − n = 0 skipped, U+2212 minus to match the rest of the generators. Easy difficulty stays count-only, matching how add is gated. Renders via the existing mode:'text' path — no app.js change. Wizard needs no change (TYPE_META grades for currency are unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the ability to subtract US currency to the
US currencymath worksheet type: a newsubtractmode ingenerator.js genCurrency, alongside the existingcount/add/changemodes.$a − $b =(U+2212 minus, matching every other generator in the file)add: 5–50¢ at Grade 2, 5¢–$9.99 at Grade 3+n − n = 0skipped (same convention asgenSubtraction, generator.js:78)addis already gatedmode:'text'path — noapp.jschangeTYPE_META.currency.gradesis unchanged andwizard.jsreadsTYPE_METAliveDocs (same-PR rule)
CHANGELOG.md— Unreleased → Added entry. README doesn't enumerate currency modes, so nothing else to touch.Testing
node --check generator.js(what CI gates on) passes🤖 Generated with Claude Code