From f89f308c525e9deebc6d2cf6416e27dfe1a299dc Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 16:03:38 +0200 Subject: Cleanup DiscoBot Project --- DSACore/Auxiliary/Calculator/Operator.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'DSACore/Auxiliary/Calculator/Operator.cs') 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 -- cgit v1.2.3-54-g00ecf