From 24508d811e713e91c26d1745b05f9595bdd05b3e Mon Sep 17 00:00:00 2001 From: rudy Date: Sat, 24 Feb 2024 17:35:24 +0100 Subject: [PATCH] composant player --- src/lib/Player.svelte | 34 ++++++++++++++++++++++++++++++++++ src/lib/Tile.svelte | 5 ++--- src/routes/game/+page.svelte | 15 ++++++--------- 3 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 src/lib/Player.svelte diff --git a/src/lib/Player.svelte b/src/lib/Player.svelte new file mode 100644 index 0000000..6247efa --- /dev/null +++ b/src/lib/Player.svelte @@ -0,0 +1,34 @@ + + +
+ {#await promise} +

waiting ...

+ {:then ok} +
+ + arnold + {player.player.name}
+ Argent: {player.cash}
+ Position: {tile.name} + +
+ {:catch err} + {err.message} + + {/await} +
\ No newline at end of file diff --git a/src/lib/Tile.svelte b/src/lib/Tile.svelte index bfe310a..7757e43 100644 --- a/src/lib/Tile.svelte +++ b/src/lib/Tile.svelte @@ -17,10 +17,9 @@
- {name} - {position} +
{name}
{#await promise} -

wainting ...

+

waiting ...

{:then players} {#each players as player} {#if player.tileid == _id } diff --git a/src/routes/game/+page.svelte b/src/routes/game/+page.svelte index 137cdf8..26110f5 100644 --- a/src/routes/game/+page.svelte +++ b/src/routes/game/+page.svelte @@ -1,6 +1,7 @@