public static void LoadHand(Player player) { // Draw until hand is full var freeSlotIndex = player.Hand.GetFirstFreeSlotIndex(); while (freeSlotIndex >= 0 && Deck.HasPieces()) { char? newPiece = DeckController.DrawPiece(); player.Hand.Pieces[freeSlotIndex] = newPiece; freeSlotIndex = player.Hand.GetFirstFreeSlotIndex(); } SidebarController.RenderPiecesInDeckLabel(); // Set player's hand in hand slots for (int i = 0; i < player.Hand.Pieces.Length; i++) { HandSlots[i].SetPiece(player.Hand.Pieces[i]); } }