From c3aca4a2b88f56c47b3aa13d6023b76f6038b697 Mon Sep 17 00:00:00 2001 From: afornerot Date: Sat, 24 Feb 2024 11:09:19 +0100 Subject: [PATCH] svg --- edge/server/main.js | 28 ++++++++++++++-------------- src/routes/game/+page.svelte | 9 ++++++--- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/edge/server/main.js b/edge/server/main.js index 3bda514..e90f9bf 100644 --- a/edge/server/main.js +++ b/edge/server/main.js @@ -71,25 +71,25 @@ function setFixures() { var obj = initTile(ctx, { _id: "hh1", position: 6, tiletype: "happyHour", name: "Happy hour", img: "https://blog.laddition.com/sites/default/files/2022-03/sans-titre-17_0.png" }); var obj = initTile(ctx, { _id: "b6", position: 7, tiletype: "bar", name: "La fine mousse", prixDeBase: "3", img: "https://cdn.eat-list.fr/establishment/photo/gallery_photo/75011-paris-11/la-fine-mousse_91615_c4c.jpg" }); var obj = initTile(ctx, { _id: "b7", position: 8, tiletype: "bar", name: "Le barboteur", prixDeBase: "3", img: "https://storage.googleapis.com/statics-wp/sites/lebarboteurlille.com/Le-Barboteur-0-1-1.jpg" }); - var obj = initTile(ctx, { _id: "b7", position: 9, tiletype: "bar", name: "Le palais de la bière", prixDeBase: "3", img: "https://www.tourisme-pontaudemer-rislenormande.com/wp-content/uploads/2017/03/Palais-de-la-bi%C3%A8re.jpeg" }); + var obj = initTile(ctx, { _id: "b8", position: 9, tiletype: "bar", name: "Le palais de la bière", prixDeBase: "3", img: "https://www.tourisme-pontaudemer-rislenormande.com/wp-content/uploads/2017/03/Palais-de-la-bi%C3%A8re.jpeg" }); var obj = initTile(ctx, { _id: "meetup2", position: 10, tiletype: "meetup", name: "Rencontre", img: "https://www.monpetitdate.fr/wp-content/uploads/2022/01/rencontre-trans-paris.jpg" }); - var obj = initTile(ctx, { _id: "b8", position: 11, tiletype: "bar", name: "Le comptoir des bières", prixDeBase: "4", img: "https://lh3.googleusercontent.com/p/AF1QipPRj-YgeXsNxXjkpxill-QMSh20T9jeNl8OLcuj=s1600-w640" }); - var obj = initTile(ctx, { _id: "b9", position: 12, tiletype: "bar", name: "Les moulins bleus", prixDeBase: "4", img: "https://www.brunnenbraeu.org/Alben2/MoulinsBleusDijon/album/slides/Les%20Moulins%20Bleus%20%E2%80%93%20Craft%20Beer%20and%20Food%20%281%29.jpg" }); - var obj = initTile(ctx, { _id: "b10", position: 13, tiletype: "bar", name: "Le fourquet", prixDeBase: "4", img: "https://media-cdn.tripadvisor.com/media/photo-s/0c/ce/ca/87/le-fourquet.jpg" }); + var obj = initTile(ctx, { _id: "b9", position: 11, tiletype: "bar", name: "Le comptoir des bières", prixDeBase: "4", img: "https://lh3.googleusercontent.com/p/AF1QipPRj-YgeXsNxXjkpxill-QMSh20T9jeNl8OLcuj=s1600-w640" }); + var obj = initTile(ctx, { _id: "b10", position: 12, tiletype: "bar", name: "Les moulins bleus", prixDeBase: "4", img: "https://www.brunnenbraeu.org/Alben2/MoulinsBleusDijon/album/slides/Les%20Moulins%20Bleus%20%E2%80%93%20Craft%20Beer%20and%20Food%20%281%29.jpg" }); + var obj = initTile(ctx, { _id: "b11", position: 13, tiletype: "bar", name: "Le fourquet", prixDeBase: "4", img: "https://media-cdn.tripadvisor.com/media/photo-s/0c/ce/ca/87/le-fourquet.jpg" }); var obj = initTile(ctx, { _id: "prs", position: 14, tiletype: "prison", name: "Cellule de dégrisement", img: "https://lvdneng.rosselcdn.net/sites/default/files/dpistyles_v2/ena_16_9_extra_big/2022/09/05/node_1224621/55601340/public/2022/09/05/B9732002324Z.1_20220905182824_000%2BGBHL6LBT5.1-0.jpg?itok=UqmdxUiM1662450019" }); - var obj = initTile(ctx, { _id: "b11", position: 15, tiletype: "bar", name: "Au beaux fûts", prixDeBase: "5", img: "https://because-gus.com/wp-content/uploads/2020/02/Bars-MaryRebeccaElliott.jpg" }); - var obj = initTile(ctx, { _id: "b12", position: 16, tiletype: "bar", name: "Le Bacchus", prixDeBase: "5", img: "https://media-cdn.tripadvisor.com/media/photo-s/10/f6/a8/75/facade.jpg" }); - var obj = initTile(ctx, { _id: "b13", position: 17, tiletype: "bar", name: "Matusalém", prixDeBase: "5", img: "https://foodforthought.com.my/wp-content/uploads/Franks-Bar-Matusalem-Rum-x-Franks-Food-For-Thought-1024x731.jpeg" }); + var obj = initTile(ctx, { _id: "b12", position: 15, tiletype: "bar", name: "Au beaux fûts", prixDeBase: "5", img: "https://because-gus.com/wp-content/uploads/2020/02/Bars-MaryRebeccaElliott.jpg" }); + var obj = initTile(ctx, { _id: "b13", position: 16, tiletype: "bar", name: "Le Bacchus", prixDeBase: "5", img: "https://media-cdn.tripadvisor.com/media/photo-s/10/f6/a8/75/facade.jpg" }); + var obj = initTile(ctx, { _id: "b14", position: 17, tiletype: "bar", name: "Matusalém", prixDeBase: "5", img: "https://foodforthought.com.my/wp-content/uploads/Franks-Bar-Matusalem-Rum-x-Franks-Food-For-Thought-1024x731.jpeg" }); var obj = initTile(ctx, { _id: "meetup3", position: 18, tiletype: "meetup", name: "Rencontre", img: "https://test.psychologies.com/var/tests/storage/images/2/3/3/1/11332-2-fre-FR/Test-pret-rencontre_thumb_434_265.jpg" }); - var obj = initTile(ctx, { _id: "b14", position: 19, tiletype: "bar", name: "Bloody Marianne", prixDeBase: "6", img: "https://lh3.googleusercontent.com/p/AF1QipPAS0edvVXEiY7_ttg_wBIegJs1Nz2lxIXmqmr3=s1600-w640" }); - var obj = initTile(ctx, { _id: "b15", position: 20, tiletype: "bar", name: "Shake it up", prixDeBase: "6", img: "https://images.barrons.com/im-839994?width=700&height=466" }); - var obj = initTile(ctx, { _id: "b16", position: 21, tiletype: "bar", name: "Le mixologue", prixDeBase: "6", img: "https://www.ciga.fr/img/cms/le-mixologue/mise-en-situation-le-mixologue.jpg" }); + var obj = initTile(ctx, { _id: "b15", position: 19, tiletype: "bar", name: "Bloody Marianne", prixDeBase: "6", img: "https://lh3.googleusercontent.com/p/AF1QipPAS0edvVXEiY7_ttg_wBIegJs1Nz2lxIXmqmr3=s1600-w640" }); + var obj = initTile(ctx, { _id: "b16", position: 20, tiletype: "bar", name: "Shake it up", prixDeBase: "6", img: "https://images.barrons.com/im-839994?width=700&height=466" }); + var obj = initTile(ctx, { _id: "b17", position: 21, tiletype: "bar", name: "Le mixologue", prixDeBase: "6", img: "https://www.ciga.fr/img/cms/le-mixologue/mise-en-situation-le-mixologue.jpg" }); var obj = initTile(ctx, { _id: "hh2", position: 22, tiletype: "happyHour", name: "Happy hour", img: "https://img.freepik.com/vecteurs-libre/fond-dessin-anime-happy-hours_52683-81243.jpg" }); - var obj = initTile(ctx, { _id: "b17", position: 23, tiletype: "bar", name: "Le senateur", prixDeBase: "7", img: "https://media-cdn.tripadvisor.com/media/photo-s/0f/72/99/b4/montreal-marriott-chateau.jpg" }); - var obj = initTile(ctx, { _id: "b18", position: 24, tiletype: "bar", name: "La dame blanche", prixDeBase: "7", img: "https://decibelles-data.media.tourinsoft.eu/upload/dame-jour.jpeg" }); + var obj = initTile(ctx, { _id: "b18", position: 23, tiletype: "bar", name: "Le senateur", prixDeBase: "7", img: "https://media-cdn.tripadvisor.com/media/photo-s/0f/72/99/b4/montreal-marriott-chateau.jpg" }); + var obj = initTile(ctx, { _id: "b19", position: 24, tiletype: "bar", name: "La dame blanche", prixDeBase: "7", img: "https://decibelles-data.media.tourinsoft.eu/upload/dame-jour.jpeg" }); var obj = initTile(ctx, { _id: "meetup4", position: 25, tiletype: "meetup", name: "Rencontre", img: "https://www.commeuncamion.com/content/uploads/2015/08/Rencontre-Couple-Bar.jpg" }); - var obj = initTile(ctx, { _id: "b19", position: 26, tiletype: "bar", name: "Le Kube", prixDeBase: "8", img: "https://www.lesbarres.com/media/image/slideshow/726a6f8ea266c7c0cbb72cbc261d3520bf8f90df.jpg" }); - var obj = initTile(ctx, { _id: "b20", position: 27, tiletype: "bar", name: "L'amirauté", prixDeBase: "8", img: "https://www.lamiraute-restaurant-saintes-maries-de-la-mer.com/media/cache/resolve/l800/websites/b510beeb640a5dc50a78118b3c8f7ce2/img/restaurant-amiraute-saintes-maries-de-la-mer-04_20210927172840.jpg" }); + var obj = initTile(ctx, { _id: "b20", position: 26, tiletype: "bar", name: "Le Kube", prixDeBase: "8", img: "https://www.lesbarres.com/media/image/slideshow/726a6f8ea266c7c0cbb72cbc261d3520bf8f90df.jpg" }); + var obj = initTile(ctx, { _id: "b21", position: 27, tiletype: "bar", name: "L'amirauté", prixDeBase: "8", img: "https://www.lamiraute-restaurant-saintes-maries-de-la-mer.com/media/cache/resolve/l800/websites/b510beeb640a5dc50a78118b3c8f7ce2/img/restaurant-amiraute-saintes-maries-de-la-mer-04_20210927172840.jpg" }); } // La fonction "onInit()" (si déclarée) est automatiquement diff --git a/src/routes/game/+page.svelte b/src/routes/game/+page.svelte index 4ccba97..6377650 100644 --- a/src/routes/game/+page.svelte +++ b/src/routes/game/+page.svelte @@ -81,12 +81,15 @@ break; case "move": - console.log("MOVE + "+data.party.playerdice); let position=parseInt(data.party.playertile.position)+parseInt(data.party.playerdice); + console.log("MOVE TO "+data.party.playertile.position+" + "+data.party.playerdice+" = "+position); // Là il faut faire la régle de passage à par la casse week enk // Voir si le mouve et super gros gérer le multipassage par weekend - if(position>27) position=position-27 + + if(position>27) { + position=position-28 + } // Mise à jour de la position du joueur data.party.playertile.position=position; @@ -97,7 +100,7 @@ Edge.Client.rpc("upsertPlayerParty",data.party.playerparty); // temporaire on passe au suivant - playernext(); + //playernext(); break; }