Ejemplo n.º 1
0
 public void Move(Point vector)
 {
     foreach (var figure in this.ChildFigures)
     {
         figure.Value.Move(vector);
     }
 }
Ejemplo n.º 2
0
        public void SumTest(double x1, double y1, double x2, double y2, double x3, double y3)
        {
            var firstPoint = new Point(x1, y1);
            var secondPoint = new Point(x2, y2);
            var resultPoint = firstPoint + secondPoint;

            Assert.That(resultPoint.X, Is.EqualTo(x3).Within(.0005));
            Assert.That(resultPoint.Y, Is.EqualTo(y3).Within(.0005));
        }
Ejemplo n.º 3
0
 public void RotateTest(double x1, double y1, double angle, double x2, double y2)
 {
     var testPoint = new Point(x1, y1);
     var resultPoint = testPoint.Rotate(angle);
     Assert.AreEqual(
         testPoint,
         new Point(x2, y2),
         $"{testPoint.X}:{testPoint.Y} don't equal {resultPoint.X}: {resultPoint.Y} ");
 }
Ejemplo n.º 4
0
 public void Move(Point vector)
 {
     this.center = (Point)this.center + (Point)vector;
 }
Ejemplo n.º 5
0
 public CircleFigure(Point center, double radius)
 {
     this.center = center;
     this.radius = radius;
 }
Ejemplo n.º 6
0
 public void EqualityTest(double x1, double y1, double x2, double y2)
 {
     var firstPoint = new Point(x1, y1);
     var secondPoint = new Point(x2, y2);
     Assert.IsTrue(firstPoint == secondPoint);
 }
Ejemplo n.º 7
0
 public MoveFigureCommand(string name, Point vector)
 {
     this.name = name;
     this.vector = vector;
 }
Ejemplo n.º 8
0
 public void Move(string name, Point vector)
 {
     throw new System.NotImplementedException();
 }