diff --git a/lib/chess_bloc/tap_bloc.dart b/lib/chess_bloc/tap_bloc.dart index 7e9e4cd..cf343f9 100644 --- a/lib/chess_bloc/tap_bloc.dart +++ b/lib/chess_bloc/tap_bloc.dart @@ -27,12 +27,12 @@ class TapBloc extends Bloc { ChessPiece? piece; if (ChessBloc.myColor != ChessBloc.turnColor) return; - if (event.pieceOnSquare != null && - ChessBloc.myColor != event.pieceOnSquare!.color) return; if (state.firstSquareTapped == null) { //first tap if (event.pieceOnSquare == null) return; + if (event.pieceOnSquare != null && + ChessBloc.myColor != event.pieceOnSquare!.color) return; firstTappedSquare = event.tapped; piece = event.pieceOnSquare; } else {