game runs in seperate thread

This commit is contained in:
Evan
2025-01-02 20:22:11 -08:00
parent f988d555bb
commit 8616e9bfcb
17 changed files with 135 additions and 263 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { PriorityQueue } from "@datastructures-js/priority-queue";
import { Cell, Execution, MutableGame, MutablePlayer, Player, PlayerID, PlayerType, TerrainType, TerraNullius, Tile } from "../game/Game";
import { PseudoRandom } from "../PseudoRandom";
import { manhattanDist } from "../Util";
import { MessageType } from "../../client/graphics/layers/EventsDisplay";
import { MessageType } from '../game/Game';
import { renderNumber } from "../../client/Utils";
export class AttackExecution implements Execution {
-2
View File
@@ -5,8 +5,6 @@ import { AttackExecution } from "./AttackExecution";
import { TransportShipExecution } from "./TransportShipExecution";
import { SpawnExecution } from "./SpawnExecution";
import { PortExecution } from "./PortExecution";
import { ParallelAStar, WorkerClient } from "../worker/WorkerClient";
import { PathFinder } from "../pathfinding/PathFinding";
import { DestroyerExecution } from "./DestroyerExecution";
import { BattleshipExecution } from "./BattleshipExecution";
import { GameID } from "../Schemas";
-1
View File
@@ -5,7 +5,6 @@ import { SerialAStar } from "../pathfinding/SerialAStar";
import { PseudoRandom } from "../PseudoRandom";
import { bfs, dist, manhattanDist } from "../Util";
import { TradeShipExecution } from "./TradeShipExecution";
import { ParallelAStar, WorkerClient } from "../worker/WorkerClient";
import { consolex } from "../Consolex";
import { MiniAStar } from "../pathfinding/MiniAStar";
+1 -1
View File
@@ -1,4 +1,4 @@
import { MessageType } from "../../client/graphics/layers/EventsDisplay";
import { MessageType } from '../game/Game';
import { renderNumber } from "../../client/Utils";
import { AllPlayers, Cell, Execution, MutableGame, MutablePlayer, MutableUnit, Player, PlayerID, Tile, Unit, UnitType } from "../game/Game";
import { PathFinder } from "../pathfinding/PathFinding";
+2 -1
View File
@@ -1,7 +1,8 @@
import { Unit, Cell, Execution, MutableUnit, MutableGame, MutablePlayer, Player, PlayerID, TerraNullius, Tile, TileEvent, UnitType, TerrainType } from "../game/Game";
import { and, bfs, manhattanDistWrapped, sourceDstOceanShore, targetTransportTile } from "../Util";
import { AttackExecution } from "./AttackExecution";
import { DisplayMessageEvent, MessageType } from "../../client/graphics/layers/EventsDisplay";
import { MessageType } from '../game/Game';
import { DisplayMessageEvent } from '../game/Game';
import { PathFinder } from "../pathfinding/PathFinding";
import { PathFindResultType } from "../pathfinding/AStar";
import { SerialAStar } from "../pathfinding/SerialAStar";