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
-rw-r--r--Aktywator/Tournament.cs2
3 files changed, 16 insertions, 3 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 2ee3a9a..a374121 100644
--- a/Aktywator/Resources/BuildDate.txt
+++ b/Aktywator/Resources/BuildDate.txt
@@ -1 +1 @@
-2018-01-04
+2018-02-04
diff --git a/Aktywator/Tournament.cs b/Aktywator/Tournament.cs
index d6da2d4..5fd6772 100644
--- a/Aktywator/Tournament.cs
+++ b/Aktywator/Tournament.cs
@@ -96,7 +96,7 @@ namespace Aktywator
{
DataGridViewRow row = new DataGridViewRow();
row.Cells.Add(new DataGridViewTextBoxCell());
- row.Cells[0].Value = pairNumber.ToString();
+ row.Cells[0].Value = pairNumber;
foreach (string name in names)
{
DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();