Skip to content

Instantly share code, notes, and snippets.

@zsoltk
Last active August 24, 2021 11:35
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 zsoltk/d7ce08cbcda1baf99cf8d6e084fb82e3 to your computer and use it in GitHub Desktop.
Save zsoltk/d7ce08cbcda1baf99cf8d6e084fb82e3 to your computer and use it in GitHub Desktop.
@Composable
fun Game() {
Column {
Moves()
CapturedPieces(WHITE)
Board()
CapturedPieces(BLACK)
Controls()
}
}
@Composable
fun Board() {
// Shown in previous snippet, composes Square in an 8x8 format
}
@Composable
fun Square(position: Position) {
// All of them depend on data models using position
Box {
SquareBackground()
SquareHighlight()
TargetMarks()
Piece()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment