diff --git a/app/src/main/java/org/prolibertate/games/ui/game/CatanScreen.kt b/app/src/main/java/org/prolibertate/games/ui/game/CatanScreen.kt index f287a6c..ef54979 100644 --- a/app/src/main/java/org/prolibertate/games/ui/game/CatanScreen.kt +++ b/app/src/main/java/org/prolibertate/games/ui/game/CatanScreen.kt @@ -550,6 +550,19 @@ private fun CatanPersonalPanel( fontWeight = FontWeight.Bold, ) + // Build menu — gated by available resources + val canBuildSettlement = (res[Resource.LUMBER] ?: 0) >= 1 && (res[Resource.BRICK] ?: 0) >= 1 && (res[Resource.WOOL] ?: 0) >= 1 && (res[Resource.GRAIN] ?: 0) >= 1 + val canBuildCity = (res[Resource.ORE] ?: 0) >= 3 && (res[Resource.GRAIN] ?: 0) >= 2 + val canBuyDev = (res[Resource.ORE] ?: 0) >= 1 && (res[Resource.WOOL] ?: 0) >= 1 && (res[Resource.GRAIN] ?: 0) >= 1 + val buildOptions = buildList { + if (canBuildSettlement) add("Settlement") + if (canBuildCity) add("City") + if (canBuyDev) add("Dev") + } + if (buildOptions.isNotEmpty() && yours) { + Text("Build: ${buildOptions.joinToString(", ")}", style = MaterialTheme.typography.bodySmall) + } + if (yours) { Row( modifier = Modifier.fillMaxWidth(),