Skip to content

Instantly share code, notes, and snippets.

@seanparsons
Created January 15, 2011 21:51
Show Gist options
  • Save seanparsons/781301 to your computer and use it in GitHub Desktop.
Save seanparsons/781301 to your computer and use it in GitHub Desktop.
case class ShotFired(val playerName: String, val atX: Int, val y: Int)
val result = new ShotFired("Sean", 2, 5) match {
case ShotFired(by, atX, atY) => by + " fired at (" + atX + "," + atY + ")"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment