summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;