Setup API calls for stage 0 on Digimon name button click.

This commit is contained in:
lightheel 2025-08-01 15:53:40 -04:00
parent a011ae39a4
commit bd0cc46398

View File

@ -312,9 +312,10 @@ fun BattlesScreen() {
opponentsList.forEach { opponent -> opponentsList.forEach { opponent ->
Button( Button(
onClick = { onClick = {
activeCharacter = opponent activeCharacter?.let {
println("Selected character: ${opponent.name}") RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 0, 0, opponent.name, 0) { apiResult ->
// You can add battle logic here }
}
}, },
modifier = Modifier.padding(vertical = 4.dp) modifier = Modifier.padding(vertical = 4.dp)
) { ) {
@ -347,8 +348,10 @@ fun BattlesScreen() {
opponentsList.forEach { opponent -> opponentsList.forEach { opponent ->
Button( Button(
onClick = { onClick = {
activeCharacter = opponent activeCharacter?.let {
println("Selected character: ${opponent.name}") RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 1, 0, opponent.name, 1) { apiResult ->
}
}
}, },
modifier = Modifier.padding(vertical = 4.dp) modifier = Modifier.padding(vertical = 4.dp)
) { ) {
@ -381,8 +384,10 @@ fun BattlesScreen() {
opponentsList.forEach { opponent -> opponentsList.forEach { opponent ->
Button( Button(
onClick = { onClick = {
activeCharacter = opponent activeCharacter?.let {
println("Selected character: ${opponent.name}") RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 2, 0, opponent.name, 2) { apiResult ->
}
}
}, },
modifier = Modifier.padding(vertical = 4.dp) modifier = Modifier.padding(vertical = 4.dp)
) { ) {
@ -415,8 +420,10 @@ fun BattlesScreen() {
opponentsList.forEach { opponent -> opponentsList.forEach { opponent ->
Button( Button(
onClick = { onClick = {
activeCharacter = opponent activeCharacter?.let {
println("Selected character: ${opponent.name}") RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 3, 0, opponent.name, 3) { apiResult ->
}
}
}, },
modifier = Modifier.padding(vertical = 4.dp) modifier = Modifier.padding(vertical = 4.dp)
) { ) {