Help with baccarat game

im trying to add the bonuses to my baccarat game script but having a ridiculously hard time doing so. I do not even know how to even ask the question clearly but I am trying to add the bonuses Panda and Dragon. I added them to the BetType and Wrote the Methods Dragon() and Panda() and included IsPanda() and IsDragon() in ResultManager.cs but I can not get them to work properly or not cause some type of error. I know my question is not the easiest thing to even understand what I am asking so maybe someone with more knowledge can help me even ask it right. ugh fml

BetSpace.cs

public enum BetType { Player, Banker, Tie, Panda, Dragon}

public class BetSpace : MonoBehaviour {

public BetType betType;

public float ResolveBet() {

bool won = false;

float winAmount = 0;

if (betType == BetType.Tie)

won = ResultManager.IsTie();

else if (betType == BetType.Player)

won = ResultManager.PlayerWon();

else if (betType == BetType.Panda)

won = ResultManager.IsPanda();

else if (betType == BetType.Dragon)

won = ResultManager.IsDragon();

else

won = !ResultManager.PlayerWon();

if (won)

{

winAmount = chipStack.Win

(payout);

print("Win Bet " + name + ": " + winAmount);

}

ResultManager.cs

public bool IsPanda()

{

return BaccaratGame.Panda();

}

public bool IsDragon()

{

return BaccaratGame.Dragon();

}

BaccaratGame.cs

public void Dragon()

{

if (player.hand.GetCurrentScore() == 8 &&

player.hand.GetNumberOfCards() == 3)

{

ResultManager.IsDragon();

}

}

public void Panda()

{

if(player.bankerHand.GetCurrentScore()== 7 &&

player.hand.GetNumberOfCards() == 3)

{

ResultManager.IsPanda();

}

}

Hi @Fyshrewards,

I’ve just noticed that nobody has answered here yet. In which course and lecture are you? If this is your own project, please feel free to ask our helpful community of students for advice over on our Discord chat server.


See also:

This topic was automatically closed after 6 days. New replies are no longer allowed.

Privacy & Terms