Skip to content

Instantly share code, notes, and snippets.

@andrjew andrjew/Game.scala

Created Dec 10, 2015
Embed
What would you like to do?
Pattern matching example
def moveObjects() = {
gameScene.objects.foreach {
case (id, obj: SelfMoving) => obj.move
case _ =>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.