Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <vector>
- #include <cstdint>
- #include <memory>
- #include <SFML/Graphics.hpp>
- #include <SFML/Audio.hpp>
- #include "Cards.hpp"
- class TableHandle{
- public:
- int bet = 0;
- int chips = 2000;
- int dealersum = 0;
- int playersum = 0;
- int wins, lose, tie;
- int guidePage = 1;
- bool saveGame = false;
- bool updGame = false;
- bool newGame = false;
- bool showDevInfo = false;
- bool showGuide = false;
- bool playerturn = true;
- bool gamerun = true;
- bool firstCards = true;
- bool buttonLocked = false;
- bool showPlayerWinner = false;
- bool showTableWinner = false;
- bool showTie = false;
- float dt = 0;
- float delayAI = 0;
- float delayShowWinner = 0;
- std::vector<Cards> playerCards;
- std::vector<Cards> tableCards;
- sf::Texture cardsSprite;
- sf::Texture tableWinTex;
- sf::Texture playerWinTex;
- sf::Texture tieTex;
- sf::Sprite tableWinSpr;
- sf::Sprite playerWinSpr;
- sf::Sprite tieSpr;
- sf::Font font;
- sf::Text playerDisplay;
- sf::Text tableDisplay;
- sf::Text playerStats;
- sf::Text tableStats;
- sf::Text tieStats;
- sf::Text playersChips;
- sf::Text totalBet;
- sf::Text playersSumTxt;
- sf::Text dealersSumTxt;
- enum Actions{
- Hit = 1,
- AskStop = 2,
- AskQuit = 3,
- MakeBet = 4,
- Play = 5,
- DevInfo = 6,
- ShowGuide = 7,
- SwipeLeft = 8,
- SwipeRight = 9,
- SaveGame = 10,
- UpdGame = 11
- };
- bool lockedAI = false;
- bool lockedShowWinner = false;
- bool doOnce = false;
- bool doOnceWinner = false;
- public:
- explicit TableHandle(sf::Texture&, float& dt );
- ~TableHandle();
- void EventHandle(enum Actions);
- void EventStop();
- void EventQuit();
- void RestartMatch();
- void GameRun(float&);
- uint16_t CheckWins();
- bool EventAddCards();
- void DrawTable(sf::RenderWindow& app, float& );
- int getTurn();
- void EventBet();
- void EventStartNew();
- void EventBet(sf::RenderWindow &app, float &dt);
- static void EventBetDown();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement