summaryrefslogtreecommitdiff
path: root/DSACore/Auxiliary/Calculator/Argument.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-19 17:58:42 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-19 17:58:42 +0200
commit2ab4051c6fe720dc47e99b0c305a0d779ee02d51 (patch)
tree9510ddbb174a54474934adf7991a5ba2aa39f818 /DSACore/Auxiliary/Calculator/Argument.cs
parentc4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff)
Moved Gamelogic to DSALib
Diffstat (limited to 'DSACore/Auxiliary/Calculator/Argument.cs')
-rw-r--r--DSACore/Auxiliary/Calculator/Argument.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/DSACore/Auxiliary/Calculator/Argument.cs b/DSACore/Auxiliary/Calculator/Argument.cs
deleted file mode 100644
index 5ed9ee3..0000000
--- a/DSACore/Auxiliary/Calculator/Argument.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-
-namespace DSACore.Auxiliary.Calculator
-{
- /// <summary>
- /// Provides an ISolvable class to save numbers. The class handles Argument checking and conversion from string to int.
- /// </summary>
- public class Argument : ISolvable
- {
- private readonly int value;
-
- public Argument(string value)
- {
- // check whether the value given is an empty string
- if (string.IsNullOrEmpty(value))
- throw new ArgumentException("Argument kann nicht mit einem leeren string instanziert werden. ",
- nameof(value));
-
- if (!int.TryParse(value, out var result))
- throw new ArgumentException($"Kann {value} nicht in Integer konvertieren");
-
- this.value = result;
- }
-
- public int Solve()
- {
- return value;
- }
-
- public override string ToString()
- {
- return value.ToString();
- }
- }
-} \ No newline at end of file