load players

This commit is contained in:
2024-04-05 23:08:47 +02:00
parent 05d711644d
commit 638895f0bc
3 changed files with 62 additions and 7 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
<script setup lang="ts">
const props = defineProps(['game'])
const self = useState<any>('self')
const gameObject = useState<{ [key: string]: any }>('gameObject')
</script>
<template>
<div>
<div>
self = {{ self?.username }}
<br>
market_amount = {{ props.game.market_stack?.length }}
<br>
market =
@@ -15,7 +18,7 @@ const props = defineProps(['game'])
<CardSlot :stack="props.game.gem_stack" />
</div>
<div>
players = {{ props.game.players }}
players = {{ props.game.players?.map((e: any) => gameObject[e].username) }}
</div>
</div>
</template>