added another model

This commit is contained in:
Wyatt J. Miller 2020-09-23 22:35:40 -04:00
parent a9c1f3d25b
commit cc588bbd27

View File

@ -1,4 +1,18 @@
package com.wyattjmiller.dicerollerapp package com.wyattjmiller.dicerollerapp
import kotlin.random.Random
class Randomizer { class Randomizer {
private var mCoin: Array<Coin> = Coin.values()
private var mDie: Array<Die> = Die.values()
fun randomCoinFlip(): Int {
val rand = Random.nextInt(mCoin.size)
return rand
}
fun randomDieRoll(): Int {
val rand = Random.nextInt(mDie.size)
return rand
}
} }