Private
Public Access
Created IfChunk
This commit is contained in:
1 parent
17b05c827a
commit
1d9fed93a1
2 files changed
+13
-2
No files matched your search
+1
@@ -91,6 +91,7 @@
|
||||
<Compile Include="Verbs\DrawingVerbs\Actions\ResetPen.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Shape\Square.cs" />
|
||||
<Compile Include="Verbs\DrawingVerbs\Shape\Triangle.cs" />
|
||||
<Compile Include="Verbs\Flow\IfChunk.cs" />
|
||||
<Compile Include="Verbs\Value\ValueObjects\PointValue.cs" />
|
||||
<Compile Include="Verbs\Value\ValueStorage.cs" />
|
||||
<Compile Include="Verbs\Value\ValueTypes\ComparisonValue.cs" />
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
namespace Advanced_Software_Engineering.Verbs.Flow {
|
||||
class IfChunk : VerbChunk, IVerb {
|
||||
using Advanced_Software_Engineering.Verbs.Value;
|
||||
|
||||
namespace Advanced_Software_Engineering.Verbs.Flow {
|
||||
public class IfChunk : VerbChunk, IVerb {
|
||||
|
||||
IValue conditional;
|
||||
|
||||
public IfChunk(IValue conditional) : base() {
|
||||
this.conditional = conditional;
|
||||
}
|
||||
|
||||
public void ExecuteVerb() {
|
||||
if (conditional.ToBool()) base.ExecuteVerb();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user