Commit 5b64f253 authored by Michael Schuh's avatar Michael Schuh
Browse files

fixed bugged that dealer doesnt start

parent ec7f8af2
This diff is collapsed.
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
......@@ -293,7 +293,7 @@ public class BlackJack : MonoBehaviour
void NextRound() {
gameOver = false;
ClearTable();
currentPlayer = 0;
currentPlayer = playerCount;
// initialize player states
playerStates = new int[playerCount];
}
......@@ -399,21 +399,21 @@ public class BlackJack : MonoBehaviour
return false;
}
public void ChangePlayerCount(int change)
{
if (playerCount == 1 && change == -1)
return;
playerCount += change;
public void ChangePlayerCount(int change)
{
if (playerCount == 1 && change == -1)
return;
playerCount += change;
GameObject.Find("PlayerCount").GetComponentInChildren<TMPro.TextMeshProUGUI>().text = "Players: " + playerCount.ToString();
}
public void ChangeDeckCount(int change)
{
if (deckCount == 1 && change == -1)
return;
deckCount += change;
public void ChangeDeckCount(int change)
{
if (deckCount == 1 && change == -1)
return;
deckCount += change;
GameObject.Find("DeckCount").GetComponentInChildren<TMPro.TextMeshProUGUI>().text = "Decks: " + deckCount.ToString();
}
}
......@@ -491,4 +491,4 @@ class DragMenu {
}
rect.x = Mathf.Clamp(rect.x + xSpeed, viewWidth/2, viewWidth-viewHeight*0.144f);
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment