Private
Public Access
Added Dot command
This commit is contained in:
1 parent
5dc7ec0d52
commit
7a98404d4b
2 files changed
+25
No files matched your search
@@ -83,5 +83,8 @@ namespace Advanced_Software_Engineering {
|
||||
graphics.Clear(Color.White);
|
||||
}
|
||||
|
||||
public void DrawDot() {
|
||||
graphics.FillRectangle(new SolidBrush(pen.Color), penPosition.X, penPosition.Y, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 Dot : Verb {
|
||||
Drawer drawer;
|
||||
public Dot(Drawer drawer) {
|
||||
this.drawer = drawer;
|
||||
}
|
||||
|
||||
public void ExecuteVerb() {
|
||||
drawer.DrawDot();
|
||||
}
|
||||
|
||||
public string GetDescription() {
|
||||
return "Places a dot where the pen currently is";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user