[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot game/game.cpp game/game.h utils/game_io.c...
From: |
eliot-dev |
Subject: |
[Eliot-dev] eliot game/game.cpp game/game.h utils/game_io.c... |
Date: |
Tue, 27 Dec 2005 15:01:07 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Branch:
Changes by: Olivier Teulière <address@hidden> 05/12/27 15:01:07
Modified files:
game : game.cpp game.h
utils : game_io.cpp ncurses.cpp
Log message:
Removed the useless Game::getPlayerRack() method
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/game.cpp.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/game.h.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/utils/game_io.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/utils/ncurses.cpp.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
Patches:
Index: eliot/game/game.cpp
diff -u eliot/game/game.cpp:1.26 eliot/game/game.cpp:1.27
--- eliot/game/game.cpp:1.26 Tue Dec 27 13:11:17 2005
+++ eliot/game/game.cpp Tue Dec 27 15:01:07 2005
@@ -713,12 +713,6 @@
*********************************************************/
-string Game::getPlayerRack(int num, bool iShowExtraSigns) const
-{
- return getPlayer(num).getCurrentRack().toString(iShowExtraSigns);
-}
-
-
int Game::getNHumanPlayers() const
{
int count = 0;
Index: eliot/game/game.h
diff -u eliot/game/game.h:1.25 eliot/game/game.h:1.26
--- eliot/game/game.h:1.25 Tue Dec 27 00:06:23 2005
+++ eliot/game/game.h Tue Dec 27 15:01:07 2005
@@ -127,12 +127,8 @@
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; }
/**
Index: eliot/utils/game_io.cpp
diff -u eliot/utils/game_io.cpp:1.6 eliot/utils/game_io.cpp:1.7
--- eliot/utils/game_io.cpp:1.6 Mon Dec 26 23:35:03 2005
+++ eliot/utils/game_io.cpp Tue Dec 27 15:01:07 2005
@@ -164,7 +164,7 @@
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 @@
for (int j = 0; j < iGame.getNPlayers(); j++)
{
out << "Joueur " << j << ": ";
- out << iGame.getPlayerRack(j) << endl;
+ out << iGame.getPlayer(j).getCurrentRack().toString(false) << endl;
}
}
Index: eliot/utils/ncurses.cpp
diff -u eliot/utils/ncurses.cpp:1.17 eliot/utils/ncurses.cpp:1.18
--- eliot/utils/ncurses.cpp:1.17 Mon Dec 26 23:35:03 2005
+++ eliot/utils/ncurses.cpp Tue Dec 27 15:01:07 2005
@@ -197,14 +197,15 @@
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot game/game.cpp game/game.h utils/game_io.c...,
eliot-dev <=