public override bool Compare(DominoDefinition dominoDefinition) { if ((dominoDefinition is RectangleDomino)) { RectangleDomino d = dominoDefinition as RectangleDomino; if (this.x != d.x || this.y != d.y || this.width != d.width || this.height != d.height) { return(false); } return(true); } return(false); }
public override DominoDefinition TransformDefinition(float move_x, float move_y, int i, int j, int width, int height) { DominoDefinition d = new RectangleDomino() { x = this.x + move_x, y = this.y + move_y, width = this.width, height = this.height }; d.ProtocolDefinition = TransformProtocol(i, j, width, height); return(d); }