[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/game rack.h rack.cpp
From: |
eliot-dev |
Subject: |
[Eliot-dev] eliot/game rack.h rack.cpp |
Date: |
Mon, 26 Dec 2005 21:08:08 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Branch:
Changes by: Antoine Fraboulet <address@hidden> 05/12/26 21:08:08
Modified files:
game : rack.h rack.cpp
Log message:
- add toString() method
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/rack.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/rack.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: eliot/game/rack.cpp
diff -u eliot/game/rack.cpp:1.3 eliot/game/rack.cpp:1.4
--- eliot/game/rack.cpp:1.3 Fri Nov 4 20:00:06 2005
+++ eliot/game/rack.cpp Mon Dec 26 21:08:08 2005
@@ -38,3 +38,13 @@
}
}
+string Rack::toString()
+{
+ string rs("");
+ multiset<Tile>::const_iterator it;
+ for (it = m_tiles.begin(); it != m_tiles.end(); it++)
+ {
+ rs += it->toChar();
+ }
+ return rs;
+}
Index: eliot/game/rack.h
diff -u eliot/game/rack.h:1.6 eliot/game/rack.h:1.7
--- eliot/game/rack.h:1.6 Fri Nov 4 20:00:06 2005
+++ eliot/game/rack.h Mon Dec 26 21:08:08 2005
@@ -24,6 +24,7 @@
#include "tile.h"
#include <set>
#include <list>
+#include <string>
using namespace std;
@@ -47,6 +48,8 @@
void clear() { m_tiles.clear(); }
void getTiles(list<Tile> &oTiles) const;
+ string toString();
+
private:
multiset<Tile> m_tiles;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/game rack.h rack.cpp,
eliot-dev <=