add missile silo

This commit is contained in:
Evan
2024-11-16 11:45:28 -08:00
parent 006539455d
commit e26230275b
11 changed files with 240 additions and 42 deletions
+2
View File
@@ -15,6 +15,8 @@ export class BuildValidator {
return this.canBuildPort(player, tile)
case BuildItems.Destroyer:
return this.canBuildDestroyer(player, tile)
case BuildItems.MissileSilo:
return tile.owner() == player
default:
throw Error(`item ${item.type} not supported`)
}
+3 -1
View File
@@ -28,6 +28,7 @@ export enum UnitType {
Port = "Port",
Nuke = "Nuke",
TradeShip = "Trade Ship",
MissileSilo = "Missile Silo",
}
export class BuildItem {
@@ -41,7 +42,8 @@ export const BuildItems = {
// Nuke: new BuildItem(UnitType.Nuke, 1_000_000),
Nuke: new BuildItem(UnitType.Nuke, 10),
Destroyer: new BuildItem(UnitType.Destroyer, 10),
Port: new BuildItem(UnitType.Port, 0)
Port: new BuildItem(UnitType.Port, 0),
MissileSilo: new BuildItem(UnitType.MissileSilo, 10),
} as const;
export class Nation {