package it372.ssmith.magic8ball2 import kotlin.random.Random class Prediction( ) { var preds : MutableList = mutableListOf( ) fun addPrediction(p : String) { preds.add(p) } fun getPrediction( ) : String { var len = preds.size; var index = Random.nextInt(0, len - 1) return preds[index] } }