Our refactoring of this project consisted of creating a class hierarchy for types of bets. We created the RedOrBlack, EvenOrOdd, and Consecutive classes represent the three different types of bets. We added placeBet() and betIsMade() methods to all of these classes, each defined according to the specifications of the class. This polymorphism allowed us to simplify and consolidate the code in the game class. The code became more complex as a result of the hierarchy, adding new relationships between classes. We prefer our refactored code because the Game class is simplified and because the placeBet() and betIsMade() methods are moved into much more appropriate classes in the Bet class hierarchy.
forked from duke-compsci308-fall2015/example_roulette
-
Notifications
You must be signed in to change notification settings - Fork 0
Program to refactor that plays a game of roulette
License
akr24/example_roulette
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Program to refactor that plays a game of roulette
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Java 100.0%