From d0816f9fc94c5918d1b7b72a739a3737e26b15bd Mon Sep 17 00:00:00 2001 From: legonzaur Date: Fri, 26 Apr 2024 16:08:04 +0200 Subject: [PATCH] Playtest --- components/CardPreview.vue | 4 +- components/GameBoard.vue | 35 ++++++++++++---- components/PlayerList.vue | 12 +++++- components/PlayerSlot.vue | 85 ++++++++++++++++++++++++++++---------- netcode/Card.ts | 7 ++-- netcode/Effect.ts | 49 +++++++++++++++------- netcode/Game.ts | 9 ++-- netcode/Turn.ts | 9 ++-- netcode/index.ts | 24 +++++++++-- 9 files changed, 169 insertions(+), 65 deletions(-) diff --git a/components/CardPreview.vue b/components/CardPreview.vue index 739e10d..5128c5a 100644 --- a/components/CardPreview.vue +++ b/components/CardPreview.vue @@ -9,12 +9,14 @@ export interface Props { const props = defineProps() +const emit = defineEmits(["click"]) + const buttonsElement = ref(null) const rightClicked = ref(false) function cardClick() { if (props.data == null) return - console.log(JSON.parse(JSON.stringify(props.data.effects))) + emit("click") } function contextmenu(e: MouseEvent) { diff --git a/components/GameBoard.vue b/components/GameBoard.vue index feae9d8..726a849 100644 --- a/components/GameBoard.vue +++ b/components/GameBoard.vue @@ -1,5 +1,7 @@ \ No newline at end of file diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue index 8809638..33a1991 100644 --- a/components/PlayerSlot.vue +++ b/components/PlayerSlot.vue @@ -1,7 +1,9 @@