Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5: three refactoring changes #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jlie1803
Copy link

@jlie1803 jlie1803 commented May 4, 2020

1. change constant to a variable
Change the length of playNames from a fixed number 20 to a variable and assign int 20 to it

2. hide delegate
Decoupling by changing getDie1().getLastRoll() to one method and move it to Dice class

3. extract method
Extract statements in if(skunkDice.getLastRoll()==2) into a method twoSkunks()

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.

1 participant