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

Stat screen and incorrect songs screen #89

Merged
merged 7 commits into from
Mar 17, 2022

Conversation

Tsathogguaa
Copy link
Collaborator

@Tsathogguaa Tsathogguaa commented Mar 17, 2022

Added two activies to show users how they performed in a game:

image
image

@Tsathogguaa Tsathogguaa marked this pull request as draft March 17, 2022 13:25
@Tsathogguaa Tsathogguaa marked this pull request as ready for review March 17, 2022 13:41
import android.widget.TextView

class IncorrectSongsScreen : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Copy link

Choose a reason for hiding this comment

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

Method onCreate has 29 lines of code (exceeds 25 allowed). Consider refactoring.

val intent = Intent(this, GameEndingScreen::class.java)
//MOCK VALUES FOR INCORRECT SONGS, ADAPT FROM GAME DATA IN THE FUTURE
val incArray: Array<String> = arrayOf("One", "Two", "Three")
val statNames: Array<String> = arrayOf("Hello there",
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 2 locations. Consider refactoring.

"Third Stat",
"Fourth Stat",
"Fifth Stat")
val statRes: Array<String> = arrayOf("General Kenobi",
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 2 locations. Consider refactoring.


}

fun switchBackToWelcome(view: View) {
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 2 locations. Consider refactoring.

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.

Some refactoring is needed to fix codeclimate issues but we can refactor these as next weeks tasks

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.

Approved! but you should really add the doc soon ! (and clean all commented code)

import android.widget.LinearLayout.*
import android.widget.TextView

class IncorrectSongsScreen : AppCompatActivity() {
Copy link
Owner

Choose a reason for hiding this comment

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

Doc would be great

import android.view.View
import android.widget.*

class GameEndingScreen : AppCompatActivity() {
Copy link
Owner

Choose a reason for hiding this comment

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

doc too ?



val playerNameView: TextView = findViewById(R.id.end_player_name)
val statPlayerText = "Here are the stats for the player $playerName"
Copy link
Owner

Choose a reason for hiding this comment

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

hard coded text

@codeclimate
Copy link

codeclimate bot commented Mar 17, 2022

Code Climate has analyzed commit 8de5b70 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 4

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

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

View more on Code Climate.

@Tsathogguaa Tsathogguaa merged commit 9185284 into main Mar 17, 2022
@Tsathogguaa Tsathogguaa deleted the tsathogguaa/game_ending_screen branch March 17, 2022 16:18
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.

Design a game ending screen which shows various stats (#79)
3 participants