PastelTheme

This commit is contained in:
Scott Anderson
2025-05-14 01:53:36 -04:00
parent 4df361d5b1
commit 1e1a14c8a8
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -65,8 +65,9 @@ export const pastelTheme = new (class implements Theme {
}
territoryColor(player: PlayerView): Colord {
if (player.team() !== null) {
return this.teamColor(player.team());
const team = player.team();
if (team !== null) {
return this.teamColor(team);
}
if (player.info().playerType === PlayerType.Human) {
return humanColors[simpleHash(player.id()) % humanColors.length];
+3 -2
View File
@@ -65,8 +65,9 @@ export const pastelThemeDark = new (class implements Theme {
}
territoryColor(player: PlayerView): Colord {
if (player.team() !== null) {
return this.teamColor(player.team());
const team = player.team();
if (team !== null) {
return this.teamColor(team);
}
if (player.info().playerType === PlayerType.Human) {
return humanColors[simpleHash(player.id()) % humanColors.length];