Skip to content

Instantly share code, notes, and snippets.

@groundwater
Forked from mostlygeek/blah.scala
Created August 6, 2012 18:18
Show Gist options
  • Save groundwater/3277303 to your computer and use it in GitHub Desktop.
Save groundwater/3277303 to your computer and use it in GitHub Desktop.
Some Scala
abstract class Prize {
def * (int x) = {
val list = List()
for (i=0; i<x; i++){
list.append( this )
}
list
}
}
case class CoinPrize(multipler: Int) extends Prize
case class TicketPrize() extends Prize
case class NoPrize() extends Prize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment