Commit Graph

70 Commits

Author SHA1 Message Date
ad6ced5555 Change README. 2023-08-14 00:09:58 +02:00
a25f9b4280 Change README. 2023-08-14 00:09:21 +02:00
f2a4893b6f Do not convert short piece name to lower case. 2023-08-12 11:43:51 +02:00
105b6e7565 Fix two bugs
1. Fix the bug that made black move first in a new game when the old
   game was ended during blacks turn.
2. Fix bug that offered the promotion dialog to the player when a pawn
   was moved on the last rank from any square

Also, a late initializer error was fixed because the wrong move variable
was used when a pawn reached the last rank.
2023-07-11 22:29:55 +02:00
da986c8d9b Make passphrase selectable. 2023-07-06 15:01:27 +02:00
4b8624f82b Fix bug that did not change the move color when a promotion was received. 2023-07-06 00:12:03 +02:00
95fba78d0c Change behavior of promotion dialog. 2023-07-06 00:06:03 +02:00
fea24c8274 Make castling work. 2023-07-05 21:16:01 +02:00
c3d747a60e Fix position. 2023-07-03 20:05:14 +02:00
9ce188ae32 dart fix 2023-07-03 19:55:44 +02:00
a5befed62c Make promotions work. 2023-07-03 19:41:12 +02:00
0f27fc6b4e Remove unused import. 2023-07-01 09:31:48 +02:00
3bec7a84d8 Lay foundation for promotions. 2023-07-01 09:29:43 +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
0627a627d8 Send new websocket message type for sending a move. 2023-06-08 17:14:50 +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
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
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
c7810d4e7e Remove /# from URL when using the web app 2022-12-28 20:27:38 +01:00
330aeed476 Make ChessAppRouter a class. 2022-12-25 20:30:42 +01:00
d1ba004ebb Restructure app. Change design. 2022-12-25 20:18:50 +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
bff46e6f3d Fix that only allows the correct pieces to be allowed to move. 2022-12-22 00:36:30 +01:00
0356268b32 Only show turn indicator and server output when in debug mode. 2022-12-22 00:00:35 +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
aaaf40bb2b Remove a redundant call to ChessBloc that caused the position to be renewed twice.
Fix a index error (Column started with 0 while rows started with 1).
2022-12-18 23:43:06 +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
6580518105 Version change 2022-12-18 15:55: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
e696d3cd3d Rename variables for clarity. 2022-12-13 03:38:31 +01:00
27f0e802ae pubspec.lock 2022-12-13 03:36:39 +01:00
8a0139640c Add server password for connection, and change reconnect handling. 2022-12-13 03:36:22 +01:00
3889245c8a Add function to flip board. 2022-12-13 03:35:01 +01:00
4a0e57902c Set standard position. 2022-11-19 16:55:37 +01:00
35f815e82f Fix bug that removed every piece except the moved one. 2022-11-19 16:55:25 +01:00
8d5cf7592d Add Connection cubit that updates the part that must be rebuilt after a reconnect. 2022-11-19 16:36:29 +01:00