feat: card lock

This commit is contained in:
2024-07-03 00:04:23 +02:00
parent d5dd147fba
commit 866a537924
16 changed files with 1451 additions and 1231 deletions
+11
View File
@@ -64,3 +64,14 @@ export async function endTurn(game: string) {
}
);
}
export async function lockCard(game: string, cardId: string) {
const config = useRuntimeConfig();
await $fetch<User>(
new URL(`games/${game}/turn/lockCard/${cardId}`, config.public.endpoint).href,
{
method: "POST",
credentials: "include",
}
);
}
Submodule netcode/interfaces deleted from 9248bf70af
+9 -1
View File
@@ -2,12 +2,20 @@ export interface GameObject {
_id: string;
}
export interface PlayingTurn {
currentTeam: string;
cardsLocked: string[];
effectsUsed: string[];
damage: number;
gold: number;
}
export interface Game extends GameObject {
fireGems: Container;
market: Container;
marketStack: Container;
teams: Team[];
currentTurn: string;
currentTurn: PlayingTurn;
}
export interface Team extends GameObject {