-
Notifications
You must be signed in to change notification settings - Fork 0
Small refactoring and some documentation #240
Small refactoring and some documentation #240
Conversation
} | ||
return finalVal | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to have refactored that into a separate function, it avoids duplications and lengthy functions. 👍
@@ -51,27 +53,18 @@ class GameEndingActivity : AppCompatActivity() { | |||
} else {findViewById<TextView>(R.id.winnerText).text="Nobody won this game!"} | |||
} | |||
|
|||
getFromIntent(intent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, much more readable than adding all the if's directly into the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good job especially on documenting all the functions!
@@ -35,8 +38,12 @@ class LyricsBelongGameActivity : GameActivity() { | |||
val getIntent = intent.extras | |||
if (getIntent != null) { | |||
gameManager = getIntent.getSerializable("gameManager") as GameManager | |||
setNextButtonListener(ctx, gameManager) | |||
setCheckButtonListener(ctx) | |||
findViewById<Button>(R.id.nextSongButton).setOnClickListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
Code Climate has analyzed commit b2b538f and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 77.5% (80% is the threshold). This pull request will bring the total coverage in the repository to 83.9%. View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work refactoring some code. LGTM!
Just took care of some maintainability issues in some files, and added a bit of documentation to some of the files that are missing them.