diff options
author | Dennis Kobert <d-kobert@web.de> | 2019-06-12 21:47:51 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2019-06-12 21:47:51 +0200 |
commit | 304437b834e8c87687f68333ae67a13ee1377a73 (patch) | |
tree | 51dd246568e8a159627d9cb92e99890adb5cbef8 /dsa/DSALib/Auxiliary/Calculator/Operator.cs | |
parent | 2fa4a0e50ebfc97059c8b84dbd17e79f9afc8a8d (diff) |
Adjust Codestyle
Diffstat (limited to 'dsa/DSALib/Auxiliary/Calculator/Operator.cs')
-rw-r--r-- | dsa/DSALib/Auxiliary/Calculator/Operator.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/dsa/DSALib/Auxiliary/Calculator/Operator.cs b/dsa/DSALib/Auxiliary/Calculator/Operator.cs index e6aeec6..f3d5c9f 100644 --- a/dsa/DSALib/Auxiliary/Calculator/Operator.cs +++ b/dsa/DSALib/Auxiliary/Calculator/Operator.cs @@ -1,17 +1,14 @@ using System; using DSALibv.Auxiliary.Calculator; -namespace DSALib.Auxiliary.Calculator -{ +namespace DSALib.Auxiliary.Calculator { /// <summary> /// The Operator Class represents a binary operator with tow Arguments and an Operation type /// </summary> - public class Operator : ISolvable - { + public class Operator : ISolvable { private readonly ISolvable arg1, arg2; - public Operator(ISolvable arg1, ISolvable arg2, Ops operatorType) - { + public Operator(ISolvable arg1, ISolvable arg2, Ops operatorType) { this.arg1 = arg1; this.arg2 = arg2; OperatorType = operatorType; @@ -19,11 +16,9 @@ namespace DSALib.Auxiliary.Calculator public Ops OperatorType { get; set; } - public int Solve() - { + public int Solve() { int result; - switch (OperatorType) - { + switch (OperatorType) { case Ops.Dice: result = Dice.Roll(arg1.Solve(), arg2.Solve()); break; @@ -43,8 +38,7 @@ namespace DSALib.Auxiliary.Calculator return result; } - public override string ToString() - { + public override string ToString() { return $"({arg1} {OperatorType} {arg2})"; } } |