grid-auto-rows: 1fr;
grid-template-columns: repeat(3, minmax(0, 1fr));
// avoid using align-items : center; in Grid container
@Composable
fun Board() {
Column {
for (i in 0 until 8) {
Row {
for (j in 0 until 8) {
val isLightSquare = i % 2 == j % 2
val squareColor = if (isLightSquare) lightSquare else darkSquare
Box(
modifier = Modifier
.weight(1f)
.aspectRatio(1f)
.background(squareColor)
) {
Text(text = "${i + j}")
}
}
}
}
}
}