summaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/Program.cs b/Program.cs
index e0a7149..814edce 100644
--- a/Program.cs
+++ b/Program.cs
@@ -18,6 +18,37 @@ namespace BCDD
{
Console.WriteLine("Analyzing " + filename);
PBNFile file = new PBNFile(filename);
+ foreach (PBNBoard board in file.Boards)
+ {
+ DDTable table = new DDTable(board);
+ String boardNo;
+ try
+ {
+ boardNo = board.GetNumber();
+ }
+ catch (FieldNotFoundException)
+ {
+ boardNo = "?";
+ }
+ try
+ {
+ int[,] ddTable = table.GetDDTable();
+ if (ddTable != null)
+ {
+ Console.WriteLine("Board " + boardNo);
+ DDTable.PrintTable(ddTable);
+ }
+ else
+ {
+ Console.WriteLine("ERROR: unable to determine DD table for board " + boardNo);
+ }
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.Message);
+ Console.WriteLine(e.StackTrace);
+ }
+ }
}
Console.WriteLine("Press any key to continue...");
Console.ReadLine();