Private
Public Access
Updated some Values
This commit is contained in:
1 parent
7f16f31967
commit
ccf6e204c6
2 files changed
+2
-4
No files matched your search
+1
-2
@@ -7,7 +7,6 @@ namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes {
|
|||||||
private bool initialised = false;
|
private bool initialised = false;
|
||||||
|
|
||||||
private bool value;
|
private bool value;
|
||||||
private Type type = typeof(bool);
|
|
||||||
|
|
||||||
public BoolValue(bool value) {
|
public BoolValue(bool value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -28,7 +27,7 @@ namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes {
|
|||||||
|
|
||||||
public bool ToBool() {
|
public bool ToBool() {
|
||||||
if (initialised) return value;
|
if (initialised) return value;
|
||||||
else throw new Exception("not initilised");
|
else throw new Exception("Not initilised");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color ToColor() {
|
public Color ToColor() {
|
||||||
|
|||||||
+1
-2
@@ -10,7 +10,6 @@ namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes {
|
|||||||
private Color colorValueCache;
|
private Color colorValueCache;
|
||||||
|
|
||||||
private double value;
|
private double value;
|
||||||
private Type type = typeof(double);
|
|
||||||
|
|
||||||
public DoubleValue(double value) {
|
public DoubleValue(double value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -25,7 +24,7 @@ namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool ToBool() {
|
public bool ToBool() {
|
||||||
return value > 0.5;
|
return value > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color ToColor() {
|
public Color ToColor() {
|
||||||
|
|||||||
Reference in new issue
Block a user