diff --git a/lib/chess_bloc/chess_bloc.dart b/lib/chess_bloc/chess_bloc.dart index 9fd421c..8259099 100644 --- a/lib/chess_bloc/chess_bloc.dart +++ b/lib/chess_bloc/chess_bloc.dart @@ -70,7 +70,7 @@ class ChessBoardState { ChessColor turnColor = ChessColor.white; Map position = {}; - for (int i = 0; i <= 8; i++) { + for (int i = 1; i <= 8; i++) { position[ChessCoordinate(i, 7)] = ChessPiece(ChessPieceName.blackPawn, ChessColor.black); position[ChessCoordinate(i, 2)] = @@ -113,4 +113,8 @@ class ChessBoardState { return ChessBoardState._(bottomColor, turnColor, position); } + + void logPosition(Map pos) { + // for (int i = 0; i < 7; i++) + } } diff --git a/lib/chessapp/chess_square.dart b/lib/chessapp/chess_square.dart index 9352684..7889856 100644 --- a/lib/chessapp/chess_square.dart +++ b/lib/chessapp/chess_square.dart @@ -91,13 +91,6 @@ class ChessSquare extends StatelessWidget { if (move.endSquare != move.startSquare) { ServerConnection.getInstance().send( '${messageIndex++} mv ${move.startSquare.toString()} ${move.endSquare.toString()}'); - - context.read().add( - PieceMoved( - startSquare: move.startSquare, - endSquare: move.endSquare, - ), - ); } }, );