Private
Public Access
Created and linked ResetPen
This commit is contained in:
1 parent
48b8f2f1b6
commit
750fc30c1a
2 files changed
+25
No files matched your search
+22
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Advanced_Software_Engineering {
|
||||||
|
public class ResetPen : Verb {
|
||||||
|
Drawer drawer;
|
||||||
|
|
||||||
|
public ResetPen(Drawer drawer) {
|
||||||
|
this.drawer = drawer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExecuteVerb() => drawer.MovePen(new System.Drawing.Point(0, 0));
|
||||||
|
|
||||||
|
public string GetDescription() {
|
||||||
|
return "Moves pen to the start";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -130,6 +130,9 @@ namespace Advanced_Software_Engineering {
|
|||||||
case "dot":
|
case "dot":
|
||||||
case "clear":
|
case "clear":
|
||||||
return new Clear(drawer);
|
return new Clear(drawer);
|
||||||
|
case "reset":
|
||||||
|
return new ResetPen(drawer);
|
||||||
|
|
||||||
case "pen":
|
case "pen":
|
||||||
case "fill":
|
case "fill":
|
||||||
throw new Exception("Not implemented");
|
throw new Exception("Not implemented");
|
||||||
|
|||||||
Reference in new issue
Block a user