Commit Graph

32 Commits

Author SHA1 Message Date
0b4da28864 Implement moves by tapping the squares
This adds an option to dragging-and-dropping which is slightly hard on
smaller screens.
2024-01-05 22:59:31 +01:00
289ec6db26 Fix turnColor handling 2023-12-25 18:08:21 +01:00
ba947ae5e4 Fix routing and move handling 2023-12-25 17:50:58 +01:00
8f4cd2266f Handle board status message
This is another step to allow reconnecting after connection loss or
browser closing.

When the game is left with the X button on the bottom right, we will
close the websocket connection, to let the server know, that we are
gone.

The server still has issues that prevent this from working flawlessly.

Remove unused import
2023-12-09 20:48:36 +01:00
01dcc74cfc Refactor chess square and prepare display of square in check. 2023-09-04 21:39:51 +02:00
43d8d77abc Fix the current position in ChessPositionManager, now that we rely on position instead of detecting en passant ourselves. 2023-08-15 00:39:10 +02: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
43fca47dae Changes you see? To many to name them. And a splash screen for flutter web of course. 2023-06-28 12:37:59 +02:00
e27f1c7c22 Change the point in time when the board gets cleared. 2023-06-09 13:19:03 +02:00
d55c7bbe1a Fix resetting the board in case a new game is started. 2023-06-08 20:23:00 +02:00
6e5d84364d Various changes. 2023-06-08 17:10:48 +02:00
605743c0d2 Introduce api types and some changes. 2023-06-02 23:28:40 +02:00
b0d6f4002c Change connection handling (Use playerID from registering to connect via websocket. 2023-05-28 17:44:22 +02:00
9492644ac9 Introduce changes in API (register game first, then ws connection). 2023-05-28 14:54:46 +02:00
cf12bc08c4 Add helper functions and fix the bug that replayed the move sent from the server. 2023-01-30 23:40:46 +01:00
8572aa73e6 Add ChessPosition that will handle position. 2023-01-30 22:39:13 +01:00
122731ac50 Remove html depencencies and alway connecto to remote server. 2023-01-29 21:09:18 +01:00
4626084abd Do some more restructuring. ChessApp is now the app. ChessGame is the widget that contains the game and board. 2022-12-25 19:57:47 +01:00
80a24bafd6 Add GoRouter and do a lot of renaming. 2022-12-25 16:16:23 +01:00
0b7c3897e5 1. Remove leading counter from move message,
2. Only allow color to move when it's their turn.
2022-12-21 23:14:53 +01:00
c9a93dd167 Connect to localhost if in debug mode. 2022-12-18 23:06:55 +01:00
9128bb1cbb Remove Platform.localhostname because it is not supported in web app. 2022-12-18 16:11:00 +01:00
31faabcf94 Connect to localhost when I am on my dev environment. 2022-12-18 15:54:19 +01:00
23f6a6b14c Connect to correct host. Refactor some code. 2022-12-18 03:21:39 +01:00
2ad028f8a7 Many many changes. 2022-12-18 01:04:08 +01:00
c04407ae67 Make chess work.
Remove sending the new move in moveHandler, in order to prevent a loop
move -> emit -> move ...

Handle incoming moves.

There still is a major bug. Sometimes random pieces move.
2022-12-14 23:17:31 +01:00
7198f591bd Replace print() calls with log() calls. 2022-12-13 03:43:05 +01:00
8a0139640c Add server password for connection, and change reconnect handling. 2022-12-13 03:36:22 +01:00
4768d22168 Add reconnect mechanism. 2022-11-19 13:24:38 +01:00
76e141619b Add class that handles server connections via web sockets. 2022-11-13 14:25:47 +01:00