simplify tile rendering

This commit is contained in:
evanpelle
2025-01-13 15:01:31 -08:00
committed by Evan
parent 05564b7668
commit bf52754fb7
+2 -4
View File
@@ -146,16 +146,14 @@ export class TerritoryLayer implements Layer {
numToRender--
const tile = this.tileToRenderQueue.pop().tile
this.paintTerritory(tile)
tile.neighbors().forEach(t => this.paintTerritory(t, true))
}
}
paintTerritory(tile: Tile, isBorder: boolean = false, parent: Tile = null) {
paintTerritory(tile: Tile, isBorder: boolean = false) {
if (isBorder && !tile.hasOwner()) {
return
}
if (!isBorder) {
tile.neighbors().forEach(t => this.paintTerritory(t, true, tile))
}
if (!tile.hasOwner()) {
if (tile.hasFallout()) {
this.paintCell(tile.cell(), this.theme.falloutColor(), 150)