Position.dart 409 B

12345678910111213141516171819202122232425262728
  1. import 'package:gobang/flyweight/Chess.dart';
  2. /// [position] 是棋子的位置类
  3. class Position{
  4. double? _dx;
  5. double? _dy;
  6. Chess? _chess;
  7. Chess get chess => _chess!;
  8. set chess(Chess value) {
  9. _chess = value;
  10. }
  11. Position(this._dx, this._dy, this._chess);
  12. double get dx => _dx!;
  13. set dx(double value) {
  14. _dx = value;
  15. }
  16. get dy => _dy!;
  17. set dy(value) {
  18. _dy = value;
  19. }
  20. }