Add tests and squish last bugs

This commit is contained in:
KäseToatz
2024-11-07 02:34:49 +01:00
parent 0121584708
commit 98ffdbcc25
4 changed files with 144 additions and 18 deletions

View File

@ -12,6 +12,8 @@ namespace Memory.Gui
{
public const int SCOREPADDING = 160;
public const int SCOREMARGIN = 30;
public const int GRIDWIDTH = 700;
public const int GRIDHEIGHT = 500;
private Game? game;
private int deckSize = 5;
@ -104,11 +106,11 @@ namespace Memory.Gui
}
if (rows > columns)
{
Cards.Width /= (double)rows / columns;
Cards.Width = GRIDWIDTH * (double)columns / rows;
}
else if (columns > rows)
{
Cards.Height /= (double)columns / rows;
Cards.Height = GRIDHEIGHT * (double)rows / columns;
}
}