Commit Graph

19 Commits

Author SHA1 Message Date
544e0b22c5 Make games rejoinable
1. Disconnect websocket connection before connecting
2. store playerInfo when hosting a game to reuse it when rejoining
2024-05-15 19:44:02 +02:00
32caf86f7f Fix colors and make passphrase submittable via Enter
With this change, the lobby selector gets its dark background back.
Also, now the passphrase can be submitted by pressing Enter and not only
by clicking the 'check' icon.
2024-05-11 19:58:29 +02:00
9f64959498 Revert erroneous refactor 2024-02-05 10:39:01 +01:00
ba478fedca Fix snackbar in host/join dialog 2024-02-05 10:35:28 +01:00
200393ac76 Fix tapping on opponent's piece
With the previous change of starting a tap on a drag,
we removed the GestureDetector from all squares with any pieces.

This included the opponent's pieces. Tapping and taking an opponent's
piece was not possible anymore.

This was a bug, since we still want to detect a tap and take an opponent's piece.
2024-02-01 11:37:00 +01:00
13bcfb1131 Introduce checkmate screen
Show checkmate screen, once the server sends the 'gameEnded' message.

Additionally, show an icon that lets users copy the passphrase to the
clipboard.
2024-01-18 16:59:33 +01:00
212a54612c Implement moves by tapping the squares
This adds an option to dragging-and-dropping which is slightly hard on
smaller screens.

Fix promotions when tapping and fix handling of subsequently tapping two pieces of your color

Cancel tap if a drag is started (tapped square will not stay red in case a drag is started)

Change url strategy back to the hashtag thing

Change version

Fix bug that would not allow a piece move if you tried to take an opponents piece.

Fix the coloring of the last move after an invalid move was played.

Upgrading deps
2024-01-17 20:58:13 +01:00
cdc0144e39 Fix routing again 2023-12-27 15:46:15 +01:00
ba947ae5e4 Fix routing and move handling 2023-12-25 17:50:58 +01:00
7a51e71767 Make passphrase entry a dialog instead of a page.
Additionally, we set some groundwork for storing the game data (lobby
id, player id, passphrase) in permanent storage in order to reconnect
with it later.
2023-12-23 16:44:23 +01:00
c213d9b1f3 Use position to build board
Now the client considers the position sent by the server to build the
position on the board.
2023-08-14 17:04:25 +02:00
a5befed62c Make promotions work. 2023-07-03 19:41:12 +02:00
52540ec96c A lot of changes again?!? 2023-06-30 01:49:18 +02:00
6e5d84364d Various changes. 2023-06-08 17:10:48 +02:00
b0d6f4002c Change connection handling (Use playerID from registering to connect via websocket. 2023-05-28 17:44:22 +02:00
299b77d249 Resolve problems in files. 2023-05-28 14:56:01 +02:00
9492644ac9 Introduce changes in API (register game first, then ws connection). 2023-05-28 14:54:46 +02:00
d1ba004ebb Restructure app. Change design. 2022-12-25 20:18:50 +01:00
80a24bafd6 Add GoRouter and do a lot of renaming. 2022-12-25 16:16:23 +01:00