Skip to content

Instantly share code, notes, and snippets.

@scan
Created August 7, 2012 15:34
Show Gist options
  • Save scan/3286459 to your computer and use it in GitHub Desktop.
Save scan/3286459 to your computer and use it in GitHub Desktop.
trait Component[A <: Component[A]]
trait Drawable[A <: Drawable[A] with Coordinates[A]] extends Component[A]
trait Coordinates[A <: Coordinates[A]] extends Component[A] {
def x: Int
def y: Int
}
trait Sizeable[A <: Sizeable[A]] extends Component[A] {
def w: Int
def h: Int
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment