format code with prettier

This commit is contained in:
evanpelle
2025-06-06 12:45:53 -07:00
parent 9c7e0ce32f
commit 02f7caef88
10 changed files with 10 additions and 45 deletions
+1 -7
View File
@@ -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 {
+1 -7
View File
@@ -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";
@@ -1,7 +1,6 @@
import { Execution, Game, Gold, Player, PlayerID } from "../game/Game";
export class DonateGoldExecution implements Execution {
private recipient: Player;
private active = true;
@@ -1,7 +1,6 @@
import { Execution, Game, Player, PlayerID } from "../game/Game";
export class DonateTroopsExecution implements Execution {
private recipient: Player;
private active = true;
+1 -7
View File
@@ -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 {
+1 -7
View File
@@ -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";
+1 -3
View File
@@ -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 {
-1
View File
@@ -1,7 +1,6 @@
import { Execution, Game, Player, PlayerID } from "../game/Game";
export class QuickChatExecution implements Execution {
private recipient: Player;
private mg: Game;
+1 -3
View File
@@ -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() {
+4 -8
View File
@@ -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();