feat(frontend/game): Add finish screen

This commit is contained in:
2025-03-11 23:22:23 +00:00
parent 2ec1b6d3ce
commit abca156180
7 changed files with 188 additions and 73 deletions

View File

@@ -14,7 +14,7 @@ public class Game {
public int Hints { get; set; }
public ushort[]? Hand { get; set; }
public ushort[]? Deck { get; set; }
public ushort[]? Found { get; set; }
public ushort[] Found { get; set; } = Array.Empty<ushort>();
public void ShuffleDeck() {
if (Deck == null) return;
@@ -108,7 +108,10 @@ public class Game {
// (From the top may cause the indices to be off by one)
if (remove) {
foreach (var index in indices.OrderByDescending(i => i)) {
Console.WriteLine(Hand.Length);
var foundList = Found.ToList();
foundList.Add(Hand[index]);
Found = foundList.ToArray();
if (Hand.Length < 13)
{
ReplaceCardInHand(index);