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
4768d22168
Add reconnect mechanism.
2022-11-19 13:24:38 +01:00
1dab094d19
Change move messages.
2022-11-19 13:24:25 +01:00
6f124b9a5f
Fix bug in onWillAccept. Set endSquare correctly.
2022-11-19 11:46:44 +01:00
42e90f10a6
Reactivate stream builder and send pre-check messages.
2022-11-19 11:37:56 +01:00
b329cb10ad
Make chessboard fit its window.
2022-11-19 11:37:15 +01:00
75727980a7
Show server response in main window for debugging purpose.
2022-11-13 14:28:30 +01:00
ce63a3e483
Provide toString() for ChessCoordinate class.
2022-11-13 14:28:09 +01:00
aa3e3187c4
For testing purposes send move to server.
2022-11-13 14:27:00 +01:00
76e141619b
Add class that handles server connections via web sockets.
2022-11-13 14:25:47 +01:00
05980a6b63
Adding dependency to web_socket_channel
2022-11-13 14:25:18 +01:00
126286ece4
Add chess_events.dart file.
2022-11-13 13:10:06 +01:00
a6880dd0e9
Fix late/final variables. Fix calls to ChessBloc by using context.
2022-11-13 13:09:36 +01:00
0ab37c5564
Change pre-checking to be method-driven instead of event-driven, so we can get the return value.
2022-11-13 03:50:29 +01:00
8ebc010e63
Fix shit.
2022-11-13 03:42:30 +01:00
f5f89a070d
MORE CHANGES. Pieces can be moved now.
2022-11-13 03:24:42 +01:00
b3a7418c5f
More changes. Memory error when accessing state.position in ChessBloc.
2022-11-13 02:42:10 +01:00
94b7c227c9
Make a lot of changes. CAUTION: Board flips on purpose on every move.
2022-11-13 01:03:47 +01:00
f7701138a4
Add chess bloc.
2022-11-13 01:03:09 +01:00
e20573e68e
Add assets.
2022-11-13 01:02:56 +01:00
1d528d4be2
Initial commit. Board builds but without pieces and logic.
2022-11-12 22:55:45 +01:00