public void StartDealerTurn() { isPaused = true; FlipCard(tableSeats[0].CardGameObjects[0]); while (LogicModel.DealerDecision(tableSeats[0]) == "HIT") { if (deckQ.Count <= 0) { CreateDeckQueue(); } CardObject c = deckQ.Dequeue(); //creates a card object from the prefab GameObject g = Instantiate(c.prefab, GetCardHolder(0)); //adds the cards into the list of card objects and game objects at each seat tableSeats[0].seatCards.Add(c); tableSeats[0].CardGameObjects.Add(g); tableSeats[0].IncrementCardsInPlay(); CardPool.Add(g); } isPaused = false; incrementTurnCounter(); tableSeats[0].cardValue = LogicModel.Check21(tableSeats[0]); // EndGame(); CalculateBets(); game.uiManager.enableNewGame(); Debug.Log(LogicModel.DealerDecision(tableSeats[playerTurn])); }