Private
Public Access
Added better constructor
This commit is contained in:
1 parent
3ac8d5b28d
commit
e49732b1c5
1 file changed
+10
-1
+10
-1
@@ -1,7 +1,7 @@
|
||||
using Advanced_Software_Engineering.Verbs.Value.ValueTypes;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Advanced_Software_Engineering.Verbs.Value.Value_Objects {
|
||||
namespace Advanced_Software_Engineering.Verbs.Value.ValueObjects {
|
||||
|
||||
public class PointValue {
|
||||
private IValue x;
|
||||
@@ -17,12 +17,21 @@ namespace Advanced_Software_Engineering.Verbs.Value.Value_Objects {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public PointValue(string parameter1, string parameter2) {
|
||||
x = ValueFactory.CreateValue(parameter1, "int");
|
||||
y = ValueFactory.CreateValue(parameter2, "int");
|
||||
}
|
||||
|
||||
public int GetX() {
|
||||
return x.ToInt();
|
||||
}
|
||||
|
||||
public int GetY() {
|
||||
return y.ToInt();
|
||||
}
|
||||
|
||||
public Point GetPoint() {
|
||||
return new Point(GetX(), GetY());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user