Private
Public Access
Updated Expression Value to not use drawer parameter
This commit is contained in:
1 parent
a0fa3f38ff
commit
c74ee42b38
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -22,8 +22,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
||||
/// <param name="width">rectangle width</param>
|
||||
/// <param name="height">rectangle height</param>
|
||||
public Rectangle(Drawer drawer, IValue width, IValue height) {
|
||||
IValue negativeWidth = new ExpressionValue(drawer, new IntValue(0), width, ExpressionValue.SUBTRACT);
|
||||
IValue negativeHeight = new ExpressionValue(drawer, new IntValue(0), height, ExpressionValue.SUBTRACT);
|
||||
IValue negativeWidth = new ExpressionValue(new IntValue(0), width, ExpressionValue.SUBTRACT);
|
||||
IValue negativeHeight = new ExpressionValue(new IntValue(0), height, ExpressionValue.SUBTRACT);
|
||||
|
||||
points = new PointValue[]
|
||||
{
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
|
||||
private bool evaluated = false;
|
||||
private IValue evaluatedValue;
|
||||
|
||||
public ExpressionValue(Drawer drawer, IValue variable1, IValue variable2, int operation) {
|
||||
public ExpressionValue(IValue variable1, IValue variable2, int operation) {
|
||||
this.variable1 = variable1;
|
||||
this.variable2 = variable2;
|
||||
this.operation = operation;
|
||||
@@ -25,7 +25,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
|
||||
if (operation > 3 && operation < 0) throw new Exception("Bad operation");
|
||||
}
|
||||
|
||||
public ExpressionValue(Drawer drawer, IValue variable1, IValue variable2, string operation) {
|
||||
public ExpressionValue(IValue variable1, IValue variable2, string operation) {
|
||||
switch (operation) {
|
||||
case "+":
|
||||
this.operation = ADD;
|
||||
|
||||
Reference in new issue
Block a user