Private
Public Access
Documented DrawLines
This commit is contained in:
1 parent
f9169e72bd
commit
353853cf0e
1 file changed
+16
-1
+16
-1
@@ -6,22 +6,37 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
||||||
class DrawLines : Verb {
|
/// <summary>
|
||||||
|
/// DrawLines Verb class
|
||||||
|
/// </summary>
|
||||||
|
public class DrawLines : Verb {
|
||||||
Drawer drawer;
|
Drawer drawer;
|
||||||
Point[] points;
|
Point[] points;
|
||||||
|
|
||||||
bool descCreated = false;
|
bool descCreated = false;
|
||||||
string desc;
|
string desc;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DrawLines constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="drawer">drawer</param>
|
||||||
|
/// <param name="points">All of the points to visit</param>
|
||||||
public DrawLines(Drawer drawer, Point[] points) {
|
public DrawLines(Drawer drawer, Point[] points) {
|
||||||
this.drawer = drawer;
|
this.drawer = drawer;
|
||||||
this.points = points;
|
this.points = points;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Draws all the lines
|
||||||
|
/// </summary>
|
||||||
public void ExecuteVerb() {
|
public void ExecuteVerb() {
|
||||||
drawer.DrawLines(points);
|
drawer.DrawLines(points);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets description of the command.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>What points will be drawn to in what order</returns>
|
||||||
public string GetDescription() {
|
public string GetDescription() {
|
||||||
if (!descCreated) {
|
if (!descCreated) {
|
||||||
desc = "Draws a shape at points: ";
|
desc = "Draws a shape at points: ";
|
||||||
|
|||||||
Reference in new issue
Block a user