mchess-client/lib/chess_bloc/chess_events.dart

28 lines
638 B
Dart
Raw Normal View History

2022-12-25 15:16:23 +00:00
import 'package:mchess/utils/chess_utils.dart';
2022-11-13 12:10:06 +00:00
abstract class ChessEvent {}
class OpponentPieceMoved extends ChessEvent {
2022-11-13 12:10:06 +00:00
final ChessCoordinate startSquare;
final ChessCoordinate endSquare;
OpponentPieceMoved({required this.startSquare, required this.endSquare});
}
class OwnPieceMoved extends ChessEvent {
final ChessCoordinate startSquare;
final ChessCoordinate endSquare;
OwnPieceMoved({required this.startSquare, required this.endSquare});
2022-11-13 12:10:06 +00:00
}
2022-12-18 00:04:08 +00:00
class InitBoard extends ChessEvent {
InitBoard();
2022-11-13 12:10:06 +00:00
}
2022-12-18 00:04:08 +00:00
class ColorDetermined extends ChessEvent {
final ChessColor myColor;
ColorDetermined({required this.myColor});
}