Private
Public Access
Added parameter limits
This commit is contained in:
1 parent
750fc30c1a
commit
5dc7ec0d52
2 files changed
+15
-2
No files matched your search
+3
@@ -67,12 +67,15 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Verbs\DrawingVerbs\Circle.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Clear.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Dot.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\DrawLines.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\DrawTo.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\MoveTo.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Quadrilateral.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Rectangle.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\RegularPolygon.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\ResetPen.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Square.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Triangle.cs" />
|
||||
<Compile Include="Verbs\Value.cs" />
|
||||
|
||||
@@ -128,10 +128,20 @@ namespace Advanced_Software_Engineering {
|
||||
} else throw new Exception("Command has an incorrect number of parameters");
|
||||
|
||||
case "dot":
|
||||
if (parameters.Length == 0) {
|
||||
return new Dot(drawer);
|
||||
} else throw new Exception("Command doesn't take parameters");
|
||||
|
||||
|
||||
case "clear":
|
||||
return new Clear(drawer);
|
||||
if (parameters.Length == 0) {
|
||||
return new Clear(drawer);
|
||||
} else throw new Exception("Command doesn't take parameters");
|
||||
|
||||
case "reset":
|
||||
return new ResetPen(drawer);
|
||||
if (parameters.Length == 0) {
|
||||
return new ResetPen(drawer);
|
||||
} else throw new Exception("Command doesn't take parameters");
|
||||
|
||||
case "pen":
|
||||
case "fill":
|
||||
|
||||
Reference in new issue
Block a user