mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:32:21 +00:00
format code with prettier
This commit is contained in:
@@ -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,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,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,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";
|
||||
|
||||
@@ -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,7 +1,6 @@
|
||||
import { Execution, Game, Player, PlayerID } from "../game/Game";
|
||||
|
||||
export class QuickChatExecution implements Execution {
|
||||
|
||||
private recipient: Player;
|
||||
private mg: Game;
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user