57 Game(
int& numberPlayers,
const bool automatic =
false );
67 void closeBiddings(
const Biddings bestBid );
74 double computeScore(
const string& name )
const;
95 inline set< shared_ptr<Card> >
getDog()
const {
return dog; }
116 inline vector< shared_ptr<Player> >
getPlayers()
const {
return players; }
123 set<shared_ptr<Card> >getPlayerWonCards(
const shared_ptr<Player> player )
const;
129 shared_ptr<Trick> getTrick();
144 void printScores()
const;
151 shared_ptr< Card > playCard(
bool &kingJustFound );
159 bool sameTeam(
const shared_ptr<Player> p1,
const shared_ptr<Player> p2 )
const;
162 void setGame(
int& numberPlayers,
const bool automatic =
false );
165 void showDeck()
const;
168 void showPlayersCards()
const;
178 pair< shared_ptr<Player>,
Biddings > takeBiddings(
const Biddings &bestBid );
192 void addWonCards(
const string& name,
const set<shared_ptr<Card> >& cards );
200 bool isCardCalled(
const shared_ptr<Card> card,
const shared_ptr<Player> player );
209 void setNext(
const shared_ptr<Player> player );
217 vector< shared_ptr<Player> > players;
218 map< string, set<shared_ptr<Card> > > cardsPlayer;
220 shared_ptr<Trick> currentTrick;
221 stack< shared_ptr<Trick> > history;
222 shared_ptr<Player> next;
228 set< shared_ptr<Card> > dog;
233 shared_ptr<Card> kingCalled;
237 int consecutiveDealing;
238 bool chelemAnnounced;
243 shared_ptr<Player> foolGiver;
244 shared_ptr<Player> foolReceiver;
shared_ptr< Trick > getCurrentTrick() const
Inline function returning the current trick.
Definition: Game.hpp:89
Team getUnknownTeam() const
Inline function returning the unknown team (only in a 5-player game).
Definition: Game.hpp:132
int getCardsPerPlayer() const
Inline function returning the number of cards players have to play in the game.
Definition: Game.hpp:86
set< shared_ptr< Card > > getDog() const
Inline function returning the dog.
Definition: Game.hpp:95
Team is the class handling team management.
Definition: Team.hpp:32
shared_ptr< Card > getKingCalled() const
Inline function returning the called king.
Definition: Game.hpp:98
Deck is the class managing the deck of cards. Used as well as for the game deck, but also for a count...
Definition: Deck.hpp:32
Team getTakers() const
Inline function returning the taker team.
Definition: Game.hpp:126
int getIndexNext() const
Inline function returning next player's index.
Definition: Game.hpp:104
bool isBotsOnly() const
Inline function returning if it is a game without any human players.
Definition: Game.hpp:135
int getNumberPlayers() const
Inline function returning the number of players.
Definition: Game.hpp:113
Game is one of the main class of Tarot. Here are defined rules, games' turns, scores, etc.
Definition: Game.hpp:44
int getIndexToBid() const
Inline function returning the index of the next player to bid.
Definition: Game.hpp:110
Biddings
The enum containing all official biddings.
Definition: Biddings.hpp:35
vector< shared_ptr< Player > > getPlayers() const
Inline function returning the players vector.
Definition: Game.hpp:116
int getIndexBidder() const
Inline function returning bidder's index.
Definition: Game.hpp:101
Biddings getBidding() const
Inline function returning the game bid.
Definition: Game.hpp:83
bool isKingFound() const
Inline function returning if it the called king is known.
Definition: Game.hpp:138
int getIndexStarter() const
Inline function returning starter player's index.
Definition: Game.hpp:107
void updateIndexBidder()
Inline function setting indexBidder to the value of indexToBid.
Definition: Game.hpp:184
Team getDefenders() const
Inline function returning the defender team.
Definition: Game.hpp:92