projects
/
multypo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93e7259
)
added simple score display at the end and on the terminal
author
Constantin
<constantin@exxxtremesys.lu>
Sun, 5 May 2013 10:27:14 +0000
(12:27 +0200)
committer
Constantin
<constantin@exxxtremesys.lu>
Sun, 5 May 2013 10:27:14 +0000
(12:27 +0200)
game.cpp
patch
|
blob
|
history
diff --git
a/game.cpp
b/game.cpp
index 66119999b4daa8a9481c12c9b40a4d90fad9f62f..6e4b6f061584fbd3a57e01a59322d45590afb025 100644
(file)
--- a/
game.cpp
+++ b/
game.cpp
@@
-12,6
+12,7
@@
#include <map>
#include <iostream>
#include <set>
#include <map>
#include <iostream>
#include <set>
+#include <sstream>
class Renderable {
public:
class Renderable {
public:
@@
-351,7
+352,15
@@
int main (int argc, char** argv) {
}
}
}
}
- //sleep(10);
+ for (size_t i=0; i<players.size(); i++) {
+ std::stringstream msg;
+ msg << "player " << players[i]->getName() << " has " << players[i]->getScore() << " points." << std::endl;
+ std::cout << msg.str();
+ playerTextFields[i].text = msg.str();
+ }
+ render(dpy, w, gc, blackColor, toRender);
+
+ sleep(5);
return 0;
}
return 0;
}