summaryrefslogtreecommitdiff
path: root/DDTable.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-23 22:46:57 +0200
committeremkael <emkael@tlen.pl>2016-05-23 22:46:57 +0200
commit64142a33abeb873c248716fadcf527c621c8977b (patch)
tree8db45e537ef89aec9aa3ee8361cd0b03f94478d1 /DDTable.cs
parent07a273bf4d24cdf49521c9ca3c4c88662754e836 (diff)
* simplified DD trick table validation
Diffstat (limited to 'DDTable.cs')
-rw-r--r--DDTable.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/DDTable.cs b/DDTable.cs
index 31bbd82..7ba8568 100644
--- a/DDTable.cs
+++ b/DDTable.cs
@@ -32,14 +32,11 @@ namespace BCDD
private int[,] validateTable(int[,] table)
{
- for (int i = 0; i < 4; i++)
+ foreach (int t in table)
{
- for (int j = 0; j < 5; j++)
+ if (t > 13 || t < 0)
{
- if (table[i, j] > 13 || table[i, j] < 0)
- {
- throw new DDTableInvalidException("Invalid number of tricks: " + table[i, j].ToString());
- }
+ throw new DDTableInvalidException("Invalid number of tricks: " + t.ToString());
}
}
return table;