import 'package:gobang/bridge/chess_shape.dart'; import 'package:gobang/flyweight/chess.dart'; /// 棋子位置;颜色由享元 [Chess] 共享,形状为外部状态。 class Position { double dx; double dy; Chess chess; ChessShape chessShape; Position(this.dx, this.dy, this.chess, {ChessShape? chessShape}) : chessShape = chessShape ?? chess.chessShape; }