Skip to content

feat: add silver and gold conversions to Currency#137

Closed
mcj-coder wants to merge 3 commits intomainfrom
feature/40-currency-value-object
Closed

feat: add silver and gold conversions to Currency#137
mcj-coder wants to merge 3 commits intomainfrom
feature/40-currency-value-object

Conversation

@mcj-coder
Copy link
Copy Markdown
Contributor

Summary

Implements Epic 5.1 - Currency value object with multi-denomination support.

Changes

  • Added FromSilver() and FromGold() static factory methods
  • Added Silver and Gold properties for reading denomination values
  • Added FromMixed() for creating currency from multiple denominations
  • Added ToBreakdown() for breaking currency into gold/silver/copper components
  • Added 6 new tests covering all conversion scenarios

Conversion Rates

  • 1 silver = 10 copper
  • 1 gold = 100 copper

Test Coverage

  • ✅ FromSilver converts correctly (5 silver = 50 copper)
  • ✅ FromGold converts correctly (3 gold = 300 copper)
  • ✅ Silver property returns correct value (75 copper = 7 silver)
  • ✅ Gold property returns correct value (350 copper = 3 gold)
  • ✅ FromMixed creates from multiple denominations (2g 3s 5c = 235c)
  • ✅ ToBreakdown returns correct components (347c = 3g 4s 7c)

Verification

  • All 517 tests pass (433 Core + 84 Simulation)
  • Build succeeds with --warnaserror (zero warnings)
  • Follows TDD approach (tests written first)

Closes #40

🤖 Generated with Claude Code

Implements Epic 5.1 - Currency value object with multi-denomination support.

Changes:
- Added FromSilver() and FromGold() static factory methods
- Added Silver and Gold properties for conversion from copper
- Added FromMixed() for creating currency from multiple denominations
- Added ToBreakdown() for breaking currency into component parts
- Added 6 new tests covering all conversion scenarios

Conversion rates:
- 1 silver = 10 copper
- 1 gold = 100 copper

Refs #40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 19, 2026

Messages
📖 ✅ Issue properly linked: Closes #40
📖 ✅ Summary section found
📖 ✅ PR title follows Conventional Commits format

Recommended Persona Reviews

💻 .NET Specialist - C# code changes detected

See docs/roles/ for persona details.


Danger analysis complete for feat: add silver and gold conversions to Currency. 4 files changed, 3 commits.

Generated by 🚫 dangerJS against 6815597

Mark Epic 5.1 (Currency value object) as complete.
Epic 5 (Economy and Inventory) is now 1/6 tasks complete.

Refs #40
Updates PROMPT.md to enforce that Contributors must:
- Check for open PR feedback BEFORE starting new work (blocking)
- Implement requested fixes immediately using TDD
- Self-verify with build and tests
- Reply to comments with verification confirmation
- NOT proceed to new tasks while PRs have unresolved feedback

Updated in three locations:
1. EXTREMELY-IMPORTANT section (blocking requirement)
2. Workflow Rules section (steps 3-4, 14)
3. Instructions for Claude (steps 2, 10)

This ensures Contributors prioritize addressing review feedback
over starting new tasks, improving PR turnaround time.
@mcj-coder
Copy link
Copy Markdown
Contributor Author

Closing due to process violation - PR was opened by Maintainer account instead of Contributor account. See issue #138 for details. This PR should be recreated from the martincjarvis (Contributor) account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.1 Implement Currency value object

2 participants