Code clean up

This commit is contained in:
Lukasz Baldyga committed 2020-11-25 05:19:58 +00:00
1 parent 15c9eb98c9
commit 5e4829cb65
4 files changed
+33 -12

No files matched your search

@@ -1,4 +1,4 @@
using Advanced_Software_Engineering.Verbs; using Advanced_Software_Engineering.Verbs.Value;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System; using System;
@@ -89,12 +89,12 @@
<Compile Include="Verbs\DrawingVerbs\ResetPen.cs" /> <Compile Include="Verbs\DrawingVerbs\ResetPen.cs" />
<Compile Include="Verbs\DrawingVerbs\Square.cs" /> <Compile Include="Verbs\DrawingVerbs\Square.cs" />
<Compile Include="Verbs\DrawingVerbs\Triangle.cs" /> <Compile Include="Verbs\DrawingVerbs\Triangle.cs" />
<Compile Include="Verbs\Value\InitialiseVariable.cs" />
<Compile Include="Verbs\Value\ValueFactory.cs" /> <Compile Include="Verbs\Value\ValueFactory.cs" />
<Compile Include="Verbs\Value\IValue.cs" /> <Compile Include="Verbs\Value\IValue.cs" />
<Compile Include="Verbs\Value\ValueHelper.cs" /> <Compile Include="Verbs\Value\ValueHelper.cs" />
<Compile Include="Verbs\IVerb.cs" /> <Compile Include="Verbs\IVerb.cs" />
<Compile Include="Verbs\Value\ValueTypes\BoolValue.cs" /> <Compile Include="Verbs\Value\ValueTypes\BoolValue.cs" />
<Compile Include="Verbs\Value\ValueTypes\BytesValue.cs" />
<Compile Include="Verbs\Value\ValueTypes\ColorValue.cs" /> <Compile Include="Verbs\Value\ValueTypes\ColorValue.cs" />
<Compile Include="Verbs\Value\ValueTypes\DoubleValue.cs" /> <Compile Include="Verbs\Value\ValueTypes\DoubleValue.cs" />
<Compile Include="Verbs\Value\ValueTypes\IntValue.cs" /> <Compile Include="Verbs\Value\ValueTypes\IntValue.cs" />
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Advanced_Software_Engineering.Verbs.Value {
public class InitialiseVariable : IVerb {
public InitialiseVariable(Drawer drawer, string type, string assgnment) {
}
void IVerb.ExecuteVerb() {
throw new NotImplementedException();
}
string IVerb.GetDescription() {
throw new NotImplementedException();
}
}
}
@@ -4,21 +4,20 @@ using System.Drawing;
namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes { namespace Advanced_Software_Engineering.Verbs.Value.ValueTypes {
internal class IntValue : IValue { internal class IntValue : IValue {
private readonly bool initialised = false;
bool initialised = false; private int value;
int value; private bool doubleValueCacheAvaiable = false;
private double doubleValueCache;
bool doubleValueCacheAvaiable = false; private bool boolValueCacheAvailable = false;
double doubleValueCache; private bool boolValueCache;
bool boolValueCacheAvailable = false; private bool colorValueCacheAvailable = false;
bool boolValueCache; private Color colorValueCache;
bool colorValueCacheAvailable = false; private Type type = typeof(int);
Color colorValueCache;
Type type = typeof(int);
public IntValue(int value) { public IntValue(int value) {
this.value = value; this.value = value;