ChessShape.dart 224 B

1234567891011121314151617
  1. abstract class ChessShape{
  2. int? _shape;
  3. int get shape => _shape!;
  4. }
  5. class CircleShape extends ChessShape{
  6. CircleShape(){
  7. _shape = 1;
  8. }
  9. }
  10. class RectShape extends ChessShape{
  11. RectShape(){
  12. _shape = 2;
  13. }
  14. }