diff options
author | emkael <emkael@tlen.pl> | 2016-05-23 15:58:18 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-05-23 16:02:54 +0200 |
commit | 74ced229ca6bf25d3d8cb8cdb82bdeca34856604 (patch) | |
tree | 7153ff45f414169e2930be3109bb07a49f62f095 /Program.cs | |
parent | 0032de9dcc7861ecc2b5c12b4ba36a059d5e2195 (diff) |
* parsing and printing double-dummy trick table
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -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();
|