28 lines
638 B
Dart
28 lines
638 B
Dart
import 'package:mchess/utils/chess_utils.dart';
|
|
|
|
abstract class ChessEvent {}
|
|
|
|
class OpponentPieceMoved extends ChessEvent {
|
|
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});
|
|
}
|
|
|
|
class InitBoard extends ChessEvent {
|
|
InitBoard();
|
|
}
|
|
|
|
class ColorDetermined extends ChessEvent {
|
|
final ChessColor myColor;
|
|
|
|
ColorDetermined({required this.myColor});
|
|
}
|