Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

fix ending buzzer v1 #371

Merged
merged 3 commits into from
Jun 9, 2022
Merged

fix ending buzzer v1 #371

merged 3 commits into from
Jun 9, 2022

Conversation

zwierski
Copy link
Collaborator

@zwierski zwierski commented Jun 9, 2022

This PR includes:

  • Removal of the -1 point penalty for a wrong answer in the local buzzer game
  • Better display of the scores layout in the ending screen of the buzzer game
  • TO BE ADDED: list of played songs at the end of buzzer game?

@@ -297,7 +301,16 @@ class BuzzerScreenActivity : GameActivity() {
checkAndStopPlayer(gameManager)
val intent = Intent(this, GameEndingActivity::class.java)

//TODO put extras to display in GameEndingActivity
//Set list of incorrect songs
val incorrectSongList: ArrayList<String> = ArrayList(
Copy link

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 4 locations. Consider refactoring.

intent.putStringArrayListExtra("incorrectSongList", incorrectSongList)

//Set list of correct songs
val correctSongList: ArrayList<String> = ArrayList(
Copy link

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 4 locations. Consider refactoring.

arrayListOf(R.id.end_stat1, R.id.end_stat2, R.id.end_stat3, R.id.end_stat4)
arrayListOf(R.id.end_stat0, R.id.end_stat1, R.id.end_stat2, R.id.end_stat3)

private val nameIds = arrayListOf(R.id.name_0, R.id.name_1, R.id.name_2, R.id.name_3)
Copy link

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 3 locations. Consider refactoring.

arrayListOf(R.id.end_stat0, R.id.end_stat1, R.id.end_stat2, R.id.end_stat3)

private val nameIds = arrayListOf(R.id.name_0, R.id.name_1, R.id.name_2, R.id.name_3)
private val scoreIds = arrayListOf(R.id.score_0, R.id.score_1, R.id.score_2, R.id.score_3)
Copy link

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 3 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Jun 9, 2022

Code Climate has analyzed commit bba4946 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 3

The test coverage on the diff in this pull request is 99.4% (80% is the threshold).

This pull request will bring the total coverage in the repository to 84.3% (0.2% change).

View more on Code Climate.

Copy link
Collaborator

@laurislopata laurislopata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Owner

@MaximeZmt MaximeZmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MaximeZmt MaximeZmt merged commit de9f309 into main Jun 9, 2022
@MaximeZmt MaximeZmt deleted the margaux/fix-buzzer-end branch June 9, 2022 17:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants