From 8ab1f558e1d454dc8b608c935ffd95c2c7c37261 Mon Sep 17 00:00:00 2001 From: Didictateur Date: Wed, 18 Feb 2026 16:20:30 +0100 Subject: [PATCH] pluie de tuile --- backend/src/api.py | 3 +- backend/src/game/tile.py | 10 +++---- index.html | 65 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 7 deletions(-) diff --git a/backend/src/api.py b/backend/src/api.py index 90cc34c..052738d 100644 --- a/backend/src/api.py +++ b/backend/src/api.py @@ -30,11 +30,12 @@ def get_tile(tile_id): return jsonify({'error': 'Tuile non trouvée'}), 404 tile = tiles[tile_id] + svg = f'{tile.get_img()}' return jsonify({ 'id': tile.id, 'family': str(tile.family), 'value': str(tile.value), - 'svg': tile.get_img() + 'svg': svg }) # ============== POST ================ diff --git a/backend/src/game/tile.py b/backend/src/game/tile.py index 83230b0..3a11a59 100644 --- a/backend/src/game/tile.py +++ b/backend/src/game/tile.py @@ -52,15 +52,13 @@ class Tile: def get_img(self): if self.img == None: - shadow = self._load_svg(self.img_shadow, x=4, y=4) + shadow = self._load_svg(self.img_shadow, x=10, y=10) front = self._load_svg(self.img_front, x=0, y=0) symbol = self._load_svg(self.img_symbol, x=12, y=20, scale=0.9) - self.img = f""" - {shadow} - {front} - {symbol} - """ + ratio = 400 / 300 + width = 60 + self.img = f"""{shadow}{front}{symbol}""" return self.img @staticmethod diff --git a/index.html b/index.html index 93ea8bb..a2dd1e1 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,46 @@ Tuto Riichi + +
+
\ No newline at end of file