I wanted the command-line version to feel as close to the real game as possible, so a few details mattered:
Features
- Move multiple cards between cascade piles in a single action
- Reject invalid moves with helpful warning messages
- Detect a finished game and congratulate the player
- Shuffle the deck at the start of every game
- Restart mid-game with a fresh deal
What I got out of it
- Applying Model-View-Controller to separate concerns cleanly
- Designing interfaces and classes that are easy to extend but resistant to change
- Thinking carefully about what should be public, private, or protected
- Building a text-driven input/output loop on the command line
Built as part of Northeastern's
Object Oriented Design
course.