Skip to content

Instantly share code, notes, and snippets.

@harmeetsingh0013
Created April 11, 2018 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harmeetsingh0013/3ebb35efc675dcd7b4aa15ea82540c86 to your computer and use it in GitHub Desktop.
Save harmeetsingh0013/3ebb35efc675dcd7b4aa15ea82540c86 to your computer and use it in GitHub Desktop.
case class Money(dollars: Int, cents: Int)
trait Data {
val balance = Money(102, 44)
val salary = Money(320, 0)
val balances: Map[String, Money] = Map(
"James" -> Money(212, 98),
"Jimmy" -> Money(43, 44)
)
val salaries: Map[String, Money] = Map(
"James" -> Money(500, 98),
"Jimmy" -> Money(500, 44)
)
val marbles: Map[String, Int] = Map(
"James" -> 4,
"Jimmy" -> 5
)
val won: Map[String, Int] = Map(
"James" -> 2,
"Jimmy" -> 1
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment