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

Commit

Permalink
Added small documentation containing current information about the cl…
Browse files Browse the repository at this point in the history
…asses involved in the PR.
  • Loading branch information
Tsathogguaa committed Mar 24, 2022
1 parent ca96954 commit fbf2ba3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import android.view.View
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import ch.sdp.vibester.R

/*
* A class representing the activity which appears upon
* completion of a game. Shows various stats.
*/
class GameEndingActivity : AppCompatActivity() {

private var incorrectSongs: ArrayList<String>? = arrayListOf("Default song")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import android.widget.LinearLayout.LayoutParams
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import ch.sdp.vibester.R

/*
* A class representing the activity which shows the list of songs the user
* guessed incorrectly during the game.
*/
class IncorrectSongsActivity : AppCompatActivity() {
private var incorrectSongs: ArrayList<String>? = ArrayList(15) //15 being max incorrect shown
private var nbIncorrect: Int = 0
Expand All @@ -28,6 +31,10 @@ class IncorrectSongsActivity : AppCompatActivity() {
generateTextView(nbIncorrect, incorrectSongs, layout)
}

/*
* A function user to generate and initialize a TextView for a nbIncorrect number of times.
* Adds each TextView to the LinearLayout provided in the arguments.
*/
private fun generateTextView(
nbIncorrect: Int,
incorrectSongs: ArrayList<String>?,
Expand Down

0 comments on commit fbf2ba3

Please sign in to comment.