feat: card lock
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user