summaryrefslogtreecommitdiffstats
path: root/Game.cpp
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2011-11-28 23:00:57 +0100
committerDominique Martinet <asmadeus@codewreck.org>2011-11-28 23:00:57 +0100
commitff3e1de3ea683911fde48da09c43391360e90d5c (patch)
tree278e8827b0492572a5c6d81227a965de0ac5ae87 /Game.cpp
parent399bd79ad3dee4f372128e443289a853959c2b70 (diff)
fixed stuff, removed some debug
Diffstat (limited to 'Game.cpp')
-rw-r--r--Game.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Game.cpp b/Game.cpp
index 0070e52..e5bf208 100644
--- a/Game.cpp
+++ b/Game.cpp
@@ -45,8 +45,6 @@ void Game::resumeGame() {
m_gameRunning = true;
}
-#include <iostream>
-
// main function to be called within glut loop
void Game::updateGame(uint timeElapsedMs) {
@@ -61,7 +59,7 @@ void Game::updateGame(uint timeElapsedMs) {
for(std::vector<Coordinates>::iterator coord = path.begin(); coord != path.end(); ++coord) {
try {
- Cell cell = m_Field.getCell(*coord);
+ Cell& cell = m_Field.getCell(*coord);
if (!(cell.getState() == EMPTY_CELL || (cell.getState() == PLAYER && (cell.getPlayer()->getNumber() == player->getNumber())))) {
player->kill();
cell.setState(BOOM);
@@ -86,9 +84,7 @@ void Game::updateGame(uint timeElapsedMs) {
if (coord == it->end() -1) {
cell.setState(PLAYER);
} else {
- std::cout << "got there: " << coord->y << std::endl;
cell.setState(PLAYER_WALL);
- if (m_Field.getCell(*coord).getState() != PLAYER_WALL) std::cout << "fuck off\n";
}
} catch (std::exception out_of_bounds) {} // don't do anything
}