Skip to content

akr24/example_roulette

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example_roulette, refactored by Jasper Hancock (jmh98) and Alex Rice (akr24)

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.

About

Program to refactor that plays a game of roulette

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%