hw-gen
hw-gen copied to clipboard
Add borrowing checkbox for subtraction problems
This commit adds a new checkbox to the print config view that allows users to generate only subtraction problems that require borrowing.
Changes:
- Added "Only problems that require borrowing?" checkbox to the UI
- Implemented requiresBorrowing() helper function to detect when a subtraction problem requires borrowing
- Updated equation generation logic to filter problems based on the borrowing constraint
- The filter only applies to subtraction category worksheets
The borrowing detection works by comparing each digit position from right to left and checking if any minuend digit is less than the corresponding subtrahend digit.