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 {}
|
|
|
|
|
2023-01-30 21:39:13 +00:00
|
|
|
class OpponentPieceMoved extends ChessEvent {
|
2022-11-13 12:10:06 +00:00
|
|
|
final ChessCoordinate startSquare;
|
|
|
|
final ChessCoordinate endSquare;
|
|
|
|
|
2023-01-30 21:39:13 +00:00
|
|
|
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});
|
|
|
|
}
|