Files

27 lines
668 B
C#

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
public class DrawTo : Verb {
protected Drawer drawer;
protected Point moveToPoint;
public DrawTo(Drawer drawer, int x, int y) {
this.drawer = drawer;
moveToPoint = new Point(x, y);
}
public void ExecuteVerb() {
drawer.DrawLine(moveToPoint);
}
public string GetDescription() {
return "Draw line " + moveToPoint.X + ", " + moveToPoint.Y;
}
}
}