Fix : switch to state based shuffle animation

This commit is contained in:
2024-07-04 22:07:48 +02:00
parent 25cf8a55e9
commit b1a874aaeb
11 changed files with 97 additions and 232 deletions
+8 -8
View File
@@ -4,12 +4,12 @@ export function delay(delay: number) {
});
}
export type ContainerHandler = {
populateContainer: () => void;
shuffleContainer: () => void;
getCardsPosition: (cards: string) => any;
startAnimation: () => void;
endAnimation: () => void;
};
// export type ContainerHandler = {
// populateContainer: () => void;
// shuffleContainer: () => void;
// getCardsPosition: (cards: string) => any;
// startAnimation: () => void;
// endAnimation: () => void;
// };
export const containerEvents = reactive(new Map<string, ContainerHandler>());
// export const containerEvents = reactive(new Map<string, ContainerHandler>());
+5 -4
View File
@@ -16,8 +16,8 @@ export interface Game extends GameObject {
marketStack: Container;
teams: Team[];
currentTurn: PlayingTurn;
started: boolean
owner: User
started: boolean;
owner: User;
}
export interface Team extends GameObject {
@@ -31,8 +31,8 @@ export interface Player extends GameObject {
hand: Container;
stack: Container;
user: User;
discardMarkers: number
fuckUMarkers: number
discardMarkers: number;
fuckUMarkers: number;
}
export interface User extends GameObject {
@@ -43,6 +43,7 @@ export interface User extends GameObject {
export interface Container extends GameObject {
cards: Card[];
shuffling?: boolean;
}
export interface Card extends GameObject {