From 31ed40344f889998fcd68e755a966141cef4e218 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 8 Mar 2017 12:51:25 +0100 Subject: * adding Event field if PBN is missing it --- src/PBNBoard.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/PBNBoard.cs') diff --git a/src/PBNBoard.cs b/src/PBNBoard.cs index d60bfe3..7578fbe 100644 --- a/src/PBNBoard.cs +++ b/src/PBNBoard.cs @@ -100,6 +100,23 @@ namespace BCDD } } + public String GetEvent() + { + return this.GetField("Event"); + } + + public void WriteEvent(String name) + { + for (int i = 0; i < this.Fields.Count; i++) + { + if ("Board".Equals(this.Fields[i].Key)) + { + this.Fields.Insert(i, new PBNField("Event", name)); + break; + } + } + } + public String GetLayout() { return this.GetField("Deal"); -- cgit v1.2.3