Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f69f94c21 |
@@ -550,6 +550,19 @@ private fun CatanPersonalPanel(
|
|||||||
fontWeight = FontWeight.Bold,
|
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<String> {
|
||||||
|
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) {
|
if (yours) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
|||||||
Reference in New Issue
Block a user