eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] Changes to eliot/game/pldrack.cpp


From: eliot-dev
Subject: [Eliot-dev] Changes to eliot/game/pldrack.cpp
Date: Sat, 05 Nov 2005 10:49:01 -0500

Index: eliot/game/pldrack.cpp
diff -u eliot/game/pldrack.cpp:1.6 eliot/game/pldrack.cpp:1.7
--- eliot/game/pldrack.cpp:1.6  Fri Nov  4 20:00:06 2005
+++ eliot/game/pldrack.cpp      Sat Nov  5 15:48:59 2005
@@ -163,22 +163,19 @@
 }
 
 
-void PlayedRack::toString(string& s) const
+string PlayedRack::toString(bool iShowExtraSigns) const
 {
     vector<Tile>::const_iterator it;
-    s = "";
-    if (nOld() > 0)
-    {
-        for (it = m_oldTiles.begin(); it != m_oldTiles.end(); it++)
-            s += it->toChar();
-    }
-    if (nOld() > 0 && nNew() > 0)
-    {
+    string s;
+
+    for (it = m_oldTiles.begin(); it != m_oldTiles.end(); it++)
+        s += it->toChar();
+
+    if (iShowExtraSigns && nOld() > 0 && nNew() > 0)
         s += "+";
-    }
-    if (nNew() > 0)
-    {
-        for (it = m_newTiles.begin(); it != m_newTiles.end(); it++)
-            s += it->toChar();
-    }
+
+    for (it = m_newTiles.begin(); it != m_newTiles.end(); it++)
+        s += it->toChar();
+
+    return s;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]