As previously mentioned, I'm using the "Manage different screens in a game" engine for my craps game. Screen_0 is my PrimaryMenu.h/cpp files. Screen_1 is my RTPlay.h/cpp files. (RTPlay = RealTimePLay which displays the crap table).
Now I'm coding the RTPlay and my design follows:
// Note: payBets = pay winning bets, collect losing bets.
while (Running)
{
while (COMEOUT_ROLL)
{
// getBetsComeout();
// rollDice();
// payBetsComeout();
// Pay bets.
// If point, set POINT_ROLL, else loop in COMEOUT_ROLL.
}
while (POINT_ROLL)
{
// getBetsPoint();
// rollDice();
// payBetsPoint();
// if 7, clear all bets and set COMEOUT_ROLL.
// if made point, pay bets and set COMEOUT_ROLL.
// else, loop in POINT_ROLL.
}
}
My question is, how can I retain the craps table screen with all bets when moving between different classes?
For instance, in the "while(COMEOUT_ROLL)" loop, I first go to the "getBetsComeout()" function. Here the user clicks different bet areas on the crap table and makes bets. I assume this will be a complete SFML loop within this class.
Then I go to the "rollDice()" class. Here an animation of dice rolling across the table occurs. I assume this will be a complete SFML loop within this class.
Then I go to the "payBetsComeout()" class. Here winning bets are paid, losing bets are collected. I assume this will be a complete SFML loop within this class.
So how can I retain the chip sprites on the crap table when I go to the rollDice class. And then when I go to the payBetsComeout class? I'll also have to retain the chip sprites when I go to the "while (POINT_ROLL)" loop.
How would you do this?
Thanks,
Raptor