thread_split: convert all tile to tileref

This commit is contained in:
Evan
2025-02-01 12:05:11 -08:00
parent c42cc2a9b4
commit f0f5bae79f
53 changed files with 1101 additions and 1402 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { PlayerActions, PlayerID, PlayerInfo, PlayerProfile, Tile } from "../game/Game";
import { PlayerActions, PlayerID, PlayerInfo, PlayerProfile } from "../game/Game";
import { GameUpdateViewData } from "../GameView";
import { GameConfig, GameID, Turn } from "../Schemas";
import { generateID } from "../Util";
@@ -115,7 +115,7 @@ export class WorkerClient {
})
}
playerInteraction(playerID: PlayerID, tile: Tile): Promise<PlayerActions> {
playerInteraction(playerID: PlayerID, x: number, y: number): Promise<PlayerActions> {
return new Promise((resolve, reject) => {
if (!this.isInitialized) {
reject(new Error('Worker not initialized'));
@@ -134,8 +134,8 @@ export class WorkerClient {
type: 'player_actions',
id: messageId,
playerID: playerID,
x: tile.cell().x,
y: tile.cell().y
x: x,
y: y
});
});
}