summaryrefslogtreecommitdiff
path: root/Aktywator
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator')
-rw-r--r--Aktywator/PBNBoard.cs15
-rw-r--r--Aktywator/Resources/BuildDate.txt2
2 files changed, 15 insertions, 2 deletions
diff --git a/Aktywator/PBNBoard.cs b/Aktywator/PBNBoard.cs
index fadfd22..994108e 100644
--- a/Aktywator/PBNBoard.cs
+++ b/Aktywator/PBNBoard.cs
@@ -88,7 +88,20 @@ namespace Aktywator
public String GetLayout()
{
string[] dealParts = this.GetField("Deal").Split(':');
- return dealParts[dealParts.Length - 1];
+ string layout = dealParts[dealParts.Length - 1];
+ if (dealParts.Length > 1)
+ {
+ string[] layoutParts = layout.Split(' ');
+ string[] rotatedLayout = { "", "", "", "" };
+ char dealer = dealParts[0][0];
+ int rotation = Array.IndexOf(DDTable.PLAYERS, dealer);
+ for (int i = 0; i < rotatedLayout.Length; i++)
+ {
+ rotatedLayout[(i + rotation) % rotatedLayout.Length] = layoutParts[i];
+ }
+ layout = String.Join(" ", rotatedLayout);
+ }
+ return layout;
}
public String GetNumber()
diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt
index 8e190cf..fb76437 100644
--- a/Aktywator/Resources/BuildDate.txt
+++ b/Aktywator/Resources/BuildDate.txt
@@ -1 +1 @@
-2018-01-16
+2018-02-04