diff --git a/app/src/main/java/com/wyattjmiller/dicerollerapp/Randomizer.kt b/app/src/main/java/com/wyattjmiller/dicerollerapp/Randomizer.kt index 5a74ab3..57468fe 100644 --- a/app/src/main/java/com/wyattjmiller/dicerollerapp/Randomizer.kt +++ b/app/src/main/java/com/wyattjmiller/dicerollerapp/Randomizer.kt @@ -1,4 +1,18 @@ package com.wyattjmiller.dicerollerapp +import kotlin.random.Random + class Randomizer { + private var mCoin: Array = Coin.values() + private var mDie: Array = Die.values() + + fun randomCoinFlip(): Int { + val rand = Random.nextInt(mCoin.size) + return rand + } + + fun randomDieRoll(): Int { + val rand = Random.nextInt(mDie.size) + return rand + } } \ No newline at end of file