From 02f7caef883f6fcf6dcded57e6fc4bffd64737f3 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Fri, 6 Jun 2025 12:45:53 -0700 Subject: [PATCH] format code with prettier --- src/core/execution/CityExecution.ts | 8 +------- src/core/execution/DefensePostExecution.ts | 8 +------- src/core/execution/DonateGoldExecution.ts | 1 - src/core/execution/DonateTroopExecution.ts | 1 - src/core/execution/MissileSiloExecution.ts | 8 +------- src/core/execution/PlayerExecution.ts | 8 +------- src/core/execution/PortExecution.ts | 4 +--- src/core/execution/QuickChatExecution.ts | 1 - src/core/execution/utils/BotBehavior.ts | 4 +--- tests/Attack.test.ts | 12 ++++-------- 10 files changed, 10 insertions(+), 45 deletions(-) diff --git a/src/core/execution/CityExecution.ts b/src/core/execution/CityExecution.ts index 706adfb21..880755573 100644 --- a/src/core/execution/CityExecution.ts +++ b/src/core/execution/CityExecution.ts @@ -1,10 +1,4 @@ -import { - Execution, - Game, - Player, - Unit, - UnitType, -} from "../game/Game"; +import { Execution, Game, Player, Unit, UnitType } from "../game/Game"; import { TileRef } from "../game/GameMap"; export class CityExecution implements Execution { diff --git a/src/core/execution/DefensePostExecution.ts b/src/core/execution/DefensePostExecution.ts index 098b52aac..ab36f81ae 100644 --- a/src/core/execution/DefensePostExecution.ts +++ b/src/core/execution/DefensePostExecution.ts @@ -1,10 +1,4 @@ -import { - Execution, - Game, - Player, - Unit, - UnitType, -} from "../game/Game"; +import { Execution, Game, Player, Unit, UnitType } from "../game/Game"; import { TileRef } from "../game/GameMap"; import { ShellExecution } from "./ShellExecution"; diff --git a/src/core/execution/DonateGoldExecution.ts b/src/core/execution/DonateGoldExecution.ts index dfdb53622..c4b65939f 100644 --- a/src/core/execution/DonateGoldExecution.ts +++ b/src/core/execution/DonateGoldExecution.ts @@ -1,7 +1,6 @@ import { Execution, Game, Gold, Player, PlayerID } from "../game/Game"; export class DonateGoldExecution implements Execution { - private recipient: Player; private active = true; diff --git a/src/core/execution/DonateTroopExecution.ts b/src/core/execution/DonateTroopExecution.ts index ea20a2b9c..0570ac641 100644 --- a/src/core/execution/DonateTroopExecution.ts +++ b/src/core/execution/DonateTroopExecution.ts @@ -1,7 +1,6 @@ import { Execution, Game, Player, PlayerID } from "../game/Game"; export class DonateTroopsExecution implements Execution { - private recipient: Player; private active = true; diff --git a/src/core/execution/MissileSiloExecution.ts b/src/core/execution/MissileSiloExecution.ts index cadb4c8dc..7fd9459d8 100644 --- a/src/core/execution/MissileSiloExecution.ts +++ b/src/core/execution/MissileSiloExecution.ts @@ -1,10 +1,4 @@ -import { - Execution, - Game, - Player, - Unit, - UnitType, -} from "../game/Game"; +import { Execution, Game, Player, Unit, UnitType } from "../game/Game"; import { TileRef } from "../game/GameMap"; export class MissileSiloExecution implements Execution { diff --git a/src/core/execution/PlayerExecution.ts b/src/core/execution/PlayerExecution.ts index 44f69354d..effb78468 100644 --- a/src/core/execution/PlayerExecution.ts +++ b/src/core/execution/PlayerExecution.ts @@ -1,12 +1,6 @@ import { renderNumber } from "../../client/Utils"; import { Config } from "../configuration/Config"; -import { - Execution, - Game, - MessageType, - Player, - UnitType, -} from "../game/Game"; +import { Execution, Game, MessageType, Player, UnitType } from "../game/Game"; import { GameImpl } from "../game/GameImpl"; import { TileRef } from "../game/GameMap"; import { calculateBoundingBox, getMode, inscribed, simpleHash } from "../Util"; diff --git a/src/core/execution/PortExecution.ts b/src/core/execution/PortExecution.ts index ef8769f71..1f5e10d64 100644 --- a/src/core/execution/PortExecution.ts +++ b/src/core/execution/PortExecution.ts @@ -66,9 +66,7 @@ export class PortExecution implements Execution { } const port = this.random.randElement(ports); - this.mg.addExecution( - new TradeShipExecution(this.player, this.port, port), - ); + this.mg.addExecution(new TradeShipExecution(this.player, this.port, port)); } isActive(): boolean { diff --git a/src/core/execution/QuickChatExecution.ts b/src/core/execution/QuickChatExecution.ts index bf743ef46..4e545b6c5 100644 --- a/src/core/execution/QuickChatExecution.ts +++ b/src/core/execution/QuickChatExecution.ts @@ -1,7 +1,6 @@ import { Execution, Game, Player, PlayerID } from "../game/Game"; export class QuickChatExecution implements Execution { - private recipient: Player; private mg: Game; diff --git a/src/core/execution/utils/BotBehavior.ts b/src/core/execution/utils/BotBehavior.ts index 81262176f..39ff00907 100644 --- a/src/core/execution/utils/BotBehavior.ts +++ b/src/core/execution/utils/BotBehavior.ts @@ -40,9 +40,7 @@ export class BotBehavior { private emoji(player: Player, emoji: number) { if (player.type() !== PlayerType.Human) return; - this.game.addExecution( - new EmojiExecution(this.player, player.id(), emoji), - ); + this.game.addExecution(new EmojiExecution(this.player, player.id(), emoji)); } forgetOldEnemies() { diff --git a/tests/Attack.test.ts b/tests/Attack.test.ts index 37294e53e..0fcd709c1 100644 --- a/tests/Attack.test.ts +++ b/tests/Attack.test.ts @@ -21,13 +21,7 @@ let attackerSpawn: TileRef; function sendBoat(target: TileRef, source: TileRef, troops: number) { game.addExecution( - new TransportShipExecution( - defender, - null, - target, - troops, - source, - ), + new TransportShipExecution(defender, null, target, troops, source), ); } @@ -70,7 +64,9 @@ describe("Attack", () => { attacker = game.player(attackerInfo.id); defender = game.player(defenderInfo.id); - game.addExecution(new AttackExecution(100, defender, game.terraNullius().id())); + game.addExecution( + new AttackExecution(100, defender, game.terraNullius().id()), + ); game.executeNextTick(); while (defender.outgoingAttacks().length > 0) { game.executeNextTick();