From 8d525d27edb1e9f19e1b169bf5f72dd67007726a Mon Sep 17 00:00:00 2001 From: schreifuchs Date: Mon, 10 Mar 2025 13:59:07 +0100 Subject: [PATCH] add improved controlls --- app.go | 1 - frontend/src/components/TichuSelect.svelte | 14 ++--- frontend/src/routes/Game.svelte | 64 +++++++++++++++------- 3 files changed, 51 insertions(+), 28 deletions(-) diff --git a/app.go b/app.go index b35b124..cfcb480 100644 --- a/app.go +++ b/app.go @@ -49,7 +49,6 @@ func (a *App) GetGames() (games []model.Game) { } func (a *App) DeleteGame(g *model.Game) { a.db.Delete(g) - } func (a *App) NewGame() (id uint) { game := model.Game{ diff --git a/frontend/src/components/TichuSelect.svelte b/frontend/src/components/TichuSelect.svelte index 780b815..82b93f0 100644 --- a/frontend/src/components/TichuSelect.svelte +++ b/frontend/src/components/TichuSelect.svelte @@ -1,37 +1,37 @@
diff --git a/frontend/src/routes/Game.svelte b/frontend/src/routes/Game.svelte index cf0a5a7..a58912f 100644 --- a/frontend/src/routes/Game.svelte +++ b/frontend/src/routes/Game.svelte @@ -1,11 +1,10 @@ -
+
{ + if (e.deltaY > 0 && rawPoints < 130) { + rawPoints += 5; + } + if (e.deltaY < 0 && rawPoints > -30) { + rawPoints -= 5; + } + }} +> {game.TeamA} {game.TeamB}
@@ -57,23 +97,7 @@
- +