summaryrefslogtreecommitdiff
path: root/DSACore/Auxiliary/Calculator/Operator.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-19 16:03:38 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-19 16:03:38 +0200
commitf89f308c525e9deebc6d2cf6416e27dfe1a299dc (patch)
tree7097ef871ead0245efda696198443eab8e443d3a /DSACore/Auxiliary/Calculator/Operator.cs
parentf3983341be939235c1a6cd522b3bb5cc318a6d1a (diff)
Cleanup DiscoBot Project
Diffstat (limited to 'DSACore/Auxiliary/Calculator/Operator.cs')
-rw-r--r--DSACore/Auxiliary/Calculator/Operator.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/DSACore/Auxiliary/Calculator/Operator.cs b/DSACore/Auxiliary/Calculator/Operator.cs
index 440e21e..ed46186 100644
--- a/DSACore/Auxiliary/Calculator/Operator.cs
+++ b/DSACore/Auxiliary/Calculator/Operator.cs
@@ -14,7 +14,7 @@ namespace DSACore.Auxiliary.Calculator
{
this.arg1 = arg1;
this.arg2 = arg2;
- this.OperatorType = operatorType;
+ OperatorType = operatorType;
}
public Ops OperatorType { get; set; }
@@ -22,19 +22,19 @@ namespace DSACore.Auxiliary.Calculator
public int Solve()
{
int result;
- switch (this.OperatorType)
+ switch (OperatorType)
{
case Ops.Dice:
- result = Dice.Roll(this.arg1.Solve(), this.arg2.Solve());
+ result = Dice.Roll(arg1.Solve(), arg2.Solve());
break;
case Ops.Multiply:
- result = this.arg1.Solve() * this.arg2.Solve();
+ result = arg1.Solve() * arg2.Solve();
break;
case Ops.Add:
- result = this.arg1.Solve() + this.arg2.Solve();
+ result = arg1.Solve() + arg2.Solve();
break;
case Ops.Subtract:
- result = this.arg1.Solve() - this.arg2.Solve();
+ result = arg1.Solve() - arg2.Solve();
break;
default:
throw new ArgumentOutOfRangeException();
@@ -45,7 +45,7 @@ namespace DSACore.Auxiliary.Calculator
public override string ToString()
{
- return $"({this.arg1} {this.OperatorType} {this.arg2})";
+ return $"({arg1} {OperatorType} {arg2})";
}
}
-}
+} \ No newline at end of file