added another model
This commit is contained in:
parent
a9c1f3d25b
commit
cc588bbd27
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user