Katan: barbarians and improvement levels in the wide HUD #26
@@ -313,6 +313,10 @@ fun CatanHud(
|
||||
) {
|
||||
Column(Modifier.fillMaxSize(), verticalArrangement = Arrangement.spacedBy(2.dp)) {
|
||||
HudPlayerStrip(state, seats, pointsOf, style)
|
||||
// Cities & Knights: the ship and the improvement levels are as much part
|
||||
// of the game as the scores, so they sit with them rather than in a panel
|
||||
// this layout does not have room for.
|
||||
if (state.isCk) CatanBarbarians(state, Modifier.padding(horizontal = 8.dp), style)
|
||||
Box(Modifier.weight(1f).fillMaxWidth()) {
|
||||
// The island fills the whole area; controls float over its sea margin.
|
||||
ZoomPanBox(Modifier.fillMaxSize().padding(start = 64.dp, end = 64.dp, top = 30.dp, bottom = 44.dp)) {
|
||||
@@ -453,6 +457,16 @@ private fun HudPlayerStrip(
|
||||
Modifier.size(14.dp).clip(CircleShape).background(style.seats[seat]).border(1.dp, style.pieceOutline, CircleShape),
|
||||
)
|
||||
Text(seats.label(seat), fontSize = 12.sp, fontWeight = FontWeight.Bold, maxLines = 1, modifier = Modifier.weight(1f))
|
||||
// Trade, politics, science: the three improvement levels.
|
||||
if (state.isCk) {
|
||||
Text(
|
||||
text = org.prolibertate.games.game.catan.Track.entries.joinToString(" ") {
|
||||
"${it.name.first()}${org.prolibertate.games.game.catan.CatanCk.improvement(state, seat, it)}"
|
||||
},
|
||||
fontSize = 12.sp,
|
||||
maxLines = 1,
|
||||
)
|
||||
}
|
||||
Text("${pointsOf(seat)} VP · ${state.resourceCount(seat)}🂠", fontSize = 12.sp, maxLines = 1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user