mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-29 20:34:56 +01:00
Removed the useless Game::getPlayerRack() method
This commit is contained in:
parent
af720a02ee
commit
9aeeafa61b
4 changed files with 6 additions and 15 deletions
|
@ -713,12 +713,6 @@ int Game::helperSetRackManual(int p, bool iCheck, const string &iLetters)
|
|||
*********************************************************/
|
||||
|
||||
|
||||
string Game::getPlayerRack(int num, bool iShowExtraSigns) const
|
||||
{
|
||||
return getPlayer(num).getCurrentRack().toString(iShowExtraSigns);
|
||||
}
|
||||
|
||||
|
||||
int Game::getNHumanPlayers() const
|
||||
{
|
||||
int count = 0;
|
||||
|
|
|
@ -127,12 +127,8 @@ public:
|
|||
static const int RACK_SIZE;
|
||||
enum set_rack_mode {RACK_ALL, RACK_NEW, RACK_MANUAL};
|
||||
int setRack(int player, set_rack_mode mode, bool check, const string& str);
|
||||
string getPlayerRack(int, bool = false) const;
|
||||
|
||||
/**
|
||||
* Methods to access already played words.
|
||||
* The int parameter should be 0 <= int < getNTurns()
|
||||
*/
|
||||
/** Getter for the history of the game */
|
||||
const History& getHistory() const { return m_history; }
|
||||
|
||||
/**
|
||||
|
|
|
@ -164,7 +164,7 @@ void GameIO::printNonPlayed(ostream &out, const Game &iGame)
|
|||
|
||||
void GameIO::printPlayedRack(ostream &out, const Game &iGame, int n)
|
||||
{
|
||||
out << iGame.getPlayerRack(iGame.currPlayer()) << endl;
|
||||
out << iGame.getCurrentPlayer().getCurrentRack().toString(false) << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -173,7 +173,7 @@ void GameIO::printAllRacks(ostream &out, const Game &iGame)
|
|||
for (int j = 0; j < iGame.getNPlayers(); j++)
|
||||
{
|
||||
out << "Joueur " << j << ": ";
|
||||
out << iGame.getPlayerRack(j) << endl;
|
||||
out << iGame.getPlayer(j).getCurrentRack().toString(false) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -197,14 +197,15 @@ void CursesIntf::drawScoresRacks(WINDOW *win, int y, int x) const
|
|||
drawBox(win, y + yOff, x, m_game->getNPlayers() + 2, 25, _(" Racks "));
|
||||
for (int i = 0; i < m_game->getNPlayers(); i++)
|
||||
{
|
||||
string rack = m_game->getPlayer(i).getCurrentRack().toString(false);
|
||||
if (m_game->getMode() != Game::kTRAINING && i == m_game->currPlayer())
|
||||
attron(A_BOLD);
|
||||
mvwprintw(win, y + yOff + i + 1, x + 2,
|
||||
_("Player %d: %s"), i, m_game->getPlayerRack(i).c_str());
|
||||
_("Player %d: %s"), i, rack.c_str());
|
||||
if (m_game->getMode() != Game::kTRAINING && i == m_game->currPlayer())
|
||||
attroff(A_BOLD);
|
||||
// Force to refresh the whole rack
|
||||
whline(win, ' ', 7 - m_game->getPlayerRack(i).size());
|
||||
whline(win, ' ', 7 - rack.size());
|
||||
}
|
||||
|
||||
// Display a message when the search is complete
|
||||
|
|
Loading…
Add table
Reference in a new issue