Conversation
|
package com.example.mygame import android.os.Bundle class MainActivity : AppCompatActivity() { } |
|
this is best code import android.os.Bundle class MainActivity : AppCompatActivity() { } |
gedabikila-cyber
left a comment
There was a problem hiding this comment.
import com.google.android.gms.ads.rewarded.RewardedAd
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback
class MainActivity : AppCompatActivity() {
private var rewardedAd: RewardedAd? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// Beeksisa Video Load gochuu
val adRequest = AdRequest.Builder().build()
RewardedAd.load(this, "YOUR_AD_UNIT_ID", adRequest, object : RewardedAdLoadCallback() {
override fun onAdLoaded(ad: RewardedAd) {
rewardedAd = ad
}
})
// Button yoo tuqamu video agarsiisuu
btnShowVideo.setOnClickListener {
rewardedAd?.show(this) { rewardItem ->
val rewardAmount = rewardItem.amount
// Qabxii (Points) nama sanaaf dabali
userPoints += rewardAmount
statusText.text = "Points kee: $userPoints"
}
}
}
}
| @@ -1,4 +1,4 @@ | |||
| * @actions/actions-runtime | |||
There was a problem hiding this comment.
val choices = listOf("ROCK", "PAPER", "SCISSORS")
val computerSelection = choices.random()
btn.setOnClickListener {
val userChoice = input.text.toString().uppercase()
if (userChoice !in choices) {
status.text = "Please enter Rock, Paper, or Scissors"
} else if (userChoice == computerSelection) {
status.text = "Draw! Computer also chose $computerSelection"
} else if ((userChoice == "ROCK" && computerSelection == "SCISSORS") ||
(userChoice == "PAPER" && computerSelection == "ROCK") ||
(userChoice == "SCISSORS" && computerSelection == "PAPER")) {
status.text = "You Win! Computer chose $computerSelection"
} else {
status.text = "You Lose! Computer chose $computerSelection"
}
}
There was a problem hiding this comment.
best code 2 5$ dollo money
There was a problem hiding this comment.
6 code 10$ dollo money pleas
There was a problem hiding this comment.
val roll = (1..6).random()
status.text = "Sabaqni kufe: $roll 🎲"
| @@ -1,4 +1,4 @@ | |||
| * @actions/actions-runtime | |||
| https://docs.github.com/?search-overlay-open=true&search-overlay-ask-ai=true&search-overlay-input=Game%20code* @actions/actions-runtime | |||
There was a problem hiding this comment.
val secret = (1..100).random()
// Logic: guess == secret (Win), guess < secret (Higher), guess > secret (Lower)
There was a problem hiding this comment.
val options = listOf("Rock", "Paper", "Scissors")
val ai = options.random()
// Logic: If user == ai (Draw), else check who wins.
There was a problem hiding this comment.
val fortunes = listOf("Guyyaa gaarii!", "Maallaqa argatta", "Of eeggannoo godhi", "Hiriyaan haaraa ni dhufa")
status.text = fortunes.random()
| @@ -1,4 +1,4 @@ | |||
| * @actions/actions-runtime | |||
| https://docs.github.com/?search-overlay-open=true&search-overlay-ask-ai=true&search-overlay-input=Game%20code* @actions/actions-runtime | |||
|
|
|||
There was a problem hiding this comment.
val num1 = (1..10).random()
val num2 = (1..10).random()
val answer = num1 + num2
status.text = "$num1 + $num2 = ?"
| * @actions/actions-runtime | ||
| https://docs.github.com/?search-overlay-open=true&search-overlay-ask-ai=true&search-overlay-input=Game%20code* @actions/actions-runtime | ||
|
|
||
| /packages/artifact/ @actions/artifacts-actions |
There was a problem hiding this comment.
val lottoNumbers = List(6) { (1..49).random() }
status.text = "Lottoo guyyaa har'aa: ${lottoNumbers.joinToString(", ")}"
There was a problem hiding this comment.
// Chapa API fayyadamuun kaffaltii eegalchiisuu (Example)
val paymentRequest = JSONObject().apply {
put("amount", "100") // Birrii 100
put("currency", "ETB")
put("email", "user@example.com")
put("tx_ref", "unique_transaction_id_123")
}
// Koodii kanaan gara 'Payment Gateway' tti qajeelchita
fun startPayment(request: JSONObject) {
// API Call to Chapa or Telebirr
println("Kaffaltiin eegalameera: ${request.get("amount")} ETB")
}
| https://docs.github.com/?search-overlay-open=true&search-overlay-ask-ai=true&search-overlay-input=Game%20code* @actions/actions-runtime | ||
|
|
||
| /packages/artifact/ @actions/artifacts-actions | ||
| /packages/cache/ @actions/actions-cache |
There was a problem hiding this comment.
import com.google.android.gms.ads.rewarded.RewardedAd
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback
class MainActivity : AppCompatActivity() {
private var rewardedAd: RewardedAd? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// Beeksisa Video Load gochuu
val adRequest = AdRequest.Builder().build()
RewardedAd.load(this, "YOUR_AD_UNIT_ID", adRequest, object : RewardedAdLoadCallback() {
override fun onAdLoaded(ad: RewardedAd) {
rewardedAd = ad
}
})
// Button yoo tuqamu video agarsiisuu
btnShowVideo.setOnClickListener {
rewardedAd?.show(this) { rewardItem ->
val rewardAmount = rewardItem.amount
// Qabxii (Points) nama sanaaf dabali
userPoints += rewardAmount
statusText.text = "Points kee: $userPoints"
}
}
}
}
https://docs.github.com/?search-overlay-open=true&search-overlay-ask-ai=true&search-overlay-input=Game%20code
print("--- Crossing the Ocean ---")
print("You are at the edge of the ocean. You see two boats.")
choice = input("Enter (M) for Madagascar boat or (K) for Canary boat: ").upper()
if choice == "M":
elif choice == "K":
else:
print("--- Number Guessing Game ---")
secret_number = random.randint(1, 100)
attempts = 0
while True: