#include <player.h>
Collaboration diagram for Player:

Signals | |
| void | signalUpdate (Player *p) |
| Notify change of player data. | |
Public Member Functions | |
| Player (int id, QObject *parent=0) | |
| Constructor for the player. | |
| virtual | ~Player () |
| Destructor. | |
| int | id () |
| Retrive the player numner. | |
| int | getCard (int playerNumber) |
| Retrive card value at given logical position. | |
| void | deleteCard (int cardPosition) |
| Remove a card from the given position. | |
| void | addCard (int cardPosition, int card) |
| Add a card to the given position. | |
| void | startTurn () |
| Set this player to start a turn. | |
| void | stopTurn () |
| Set this player to stop a turn. | |
| void | deal (int amount) |
| Deal a number of cards to this player. | |
| void | increaseMovesWon (int amount=1) |
| Increases the number of moves one for this player. | |
| int | noOfMovesWon () |
| Retrive the number of won moves for this player. | |
| void | addWonCard (int card) |
| Adds a card which is one in a move to this player. | |
| int | getWonCard (int no) |
| Retrieve a card won by this player. | |
| int | points () |
| Retrive the amount of points this player has. | |
| void | setPoints (int points) |
| Set the points of the player. | |
| QString | name () |
| Retrive the name of the player. | |
| void | setName (QString name) |
| Set the name of the player. | |
| void | addWonGame (int amount) |
| Add a number of won games to the overall player statistic. | |
| int | wonGames () |
| Retrieve the number of won games. | |
| void | addGame (int amount) |
| Add a number of games to the overall player statistic. | |
| int | games () |
| Retrieve the number of games. | |
| void | addScore (int amount) |
| Add a score to the overall player statistic. | |
| int | score () |
| Retrieve the overall score. | |
| AbstractInput * | input () |
| Retrieve the input device of the player. | |
| void | setInput (AbstractInput *input) |
| Set the input for this player. | |
| void | setDeck (Deck *deck) |
| Set the deck for drawing cards. | |
| void | refresh () |
| Refresh GUI by emitting a signal. | |
| void | clear () |
| Clear the all time statistics of this player. | |
| void | setTrump (Suite trump) |
| Set the trump to the player. | |
| Suite | trump () |
| Retrieve the trump. | |
| void | save (KConfigGroup &config) |
| Saves the properties. | |
| void | load (KConfigGroup &config) |
| Read properties. | |
Definition at line 42 of file player.h.
|
||||||||||||
|
Constructor for the player.
Definition at line 35 of file player.cpp. References CardDeck::Club, and setName(). Here is the call graph for this function: ![]() |
|
|
Destructor.
Definition at line 54 of file player.cpp. |
|
||||||||||||
|
Add a card to the given position. Typically if the card was played back.
Definition at line 183 of file player.cpp. |
|
|
Add a number of games to the overall player statistic.
Definition at line 293 of file player.cpp. References refresh(). Referenced by EngineTwo::evaluateGame(), and EngineTwo::startGame(). Here is the call graph for this function: ![]() |
|
|
Add a score to the overall player statistic.
Definition at line 308 of file player.cpp. References refresh(). Referenced by EngineTwo::evaluateGame(). Here is the call graph for this function: ![]() |
|
|
Adds a card which is one in a move to this player. Also increase this players point by the points of the card. Note, this method has to be called with both cards of a move!
Definition at line 223 of file player.cpp. References Deck::getCardValue(), points(), and setPoints(). Referenced by EngineTwo::gameLoopFinish(). Here is the call graph for this function: ![]() |
|
|
Add a number of won games to the overall player statistic.
Definition at line 278 of file player.cpp. References refresh(). Referenced by EngineTwo::evaluateGame(). Here is the call graph for this function: ![]() |
|
|
Clear the all time statistics of this player.
Definition at line 92 of file player.cpp. References refresh(). Referenced by Mainwindow::menuClearStatistics(). Here is the call graph for this function: ![]() |
|
|
Deal a number of cards to this player.
Definition at line 102 of file player.cpp. References Deck::drawCard(). Referenced by Mainwindow::startGame(). Here is the call graph for this function: ![]() |
|
|
Remove a card from the given position. Typically if the card was played.
Definition at line 171 of file player.cpp. Referenced by EngineTwo::playerInput(). |
|
|
Retrieve the number of games.
Definition at line 301 of file player.cpp. Referenced by DisplayTwo::updatePlayer(). |
|
|
Retrive card value at given logical position.
Definition at line 195 of file player.cpp. Referenced by DisplayTwo::deal(), AiInput::getBoardFromEngine(), EngineTwo::isLegalMove(), and EngineTwo::playerInput(). |
|
|
Retrieve a card won by this player.
Definition at line 235 of file player.cpp. |
|
|
Retrive the player numner.
Definition at line 60 of file player.h. Referenced by Mainwindow::nextPlayer(), and DisplayTwo::updatePlayer(). |
|
|
Increases the number of moves one for this player.
Definition at line 209 of file player.cpp. Referenced by EngineTwo::gameLoopFinish(). |
|
|
Retrieve the input device of the player.
Definition at line 127 of file player.cpp. Referenced by setInput(), and DisplayTwo::updatePlayer(). |
|
|
Read properties.
Definition at line 71 of file player.cpp. References refresh(). Referenced by ConfigTwo::load(). Here is the call graph for this function: ![]() |
|
|
Retrive the name of the player.
Definition at line 263 of file player.cpp. Referenced by EngineTwo::evaluateGame(), Mainwindow::nextPlayer(), and DisplayTwo::updatePlayer(). |
|
|
Retrive the number of won moves for this player.
Definition at line 216 of file player.cpp. Referenced by EngineTwo::gameLoopFinish(). |
|
|
Retrive the amount of points this player has.
Definition at line 248 of file player.cpp. Referenced by addWonCard(), EngineTwo::evaluateGame(), EngineTwo::gameLoopFinish(), and DisplayTwo::updatePlayer(). |
|
|
Refresh GUI by emitting a signal.
Definition at line 337 of file player.cpp. References signalUpdate(). Referenced by addGame(), addScore(), addWonGame(), clear(), load(), setInput(), setName(), setPoints(), and setTrump(). |
|
|
Saves the properties.
Definition at line 61 of file player.cpp. Referenced by ConfigTwo::save(). |
|
|
Retrieve the overall score.
Definition at line 315 of file player.cpp. Referenced by DisplayTwo::updatePlayer(). |
|
|
Set the deck for drawing cards.
Definition at line 85 of file player.cpp. Referenced by Mainwindow::startGame(). |
|
|
Set the input for this player.
Definition at line 134 of file player.cpp. References input(), AbstractInput::inputAllowed(), refresh(), AbstractInput::setId(), and AbstractInput::setInputAllowed(). Referenced by Mainwindow::menuNewLSkatGame(), and Mainwindow::setInputType(). Here is the call graph for this function: ![]() |
|
|
Set the name of the player. Emits the signal signalUpdateName(int)
Definition at line 270 of file player.cpp. References refresh(). Referenced by Player(). Here is the call graph for this function: ![]() |
|
|
Set the points of the player. Emits the signal signalUpdatePoints(int)
Definition at line 255 of file player.cpp. References refresh(). Referenced by addWonCard(). Here is the call graph for this function: ![]() |
|
|
Set the trump to the player.
Definition at line 322 of file player.cpp. References refresh(). Referenced by Mainwindow::startGame(). Here is the call graph for this function: ![]() |
|
|
Notify change of player data.
Referenced by refresh(). |
|
|
Set this player to start a turn.
Definition at line 157 of file player.cpp. References AbstractInput::setInputAllowed(). Here is the call graph for this function: ![]() |
|
|
Set this player to stop a turn.
Definition at line 164 of file player.cpp. References AbstractInput::setInputAllowed(). Referenced by EngineTwo::playerInput(). Here is the call graph for this function: ![]() |
|
|
Retrieve the trump.
Definition at line 330 of file player.cpp. Referenced by DisplayTwo::updatePlayer(). |
|
|
Retrieve the number of won games.
Definition at line 286 of file player.cpp. Referenced by DisplayTwo::updatePlayer(). |
1.4.6