summaryrefslogtreecommitdiff
path: root/Aktywator/PBNBoard.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/PBNBoard.cs')
-rw-r--r--Aktywator/PBNBoard.cs15
1 files changed, 14 insertions, 1 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()