Index: code/branches/pCuts/src/modules/tetris/Tetris.cc
===================================================================
--- code/branches/pCuts/src/modules/tetris/Tetris.cc	(revision 9087)
+++ code/branches/pCuts/src/modules/tetris/Tetris.cc	(revision 9089)
@@ -25,8 +25,9 @@
  *      Johannes Ritz
  *
- *BUG a) double stone model (@ brick's location the stone's model is duplicated. Why does the brick have a model attached to it.)
- *BUG b) the brick is set the wrong way after a (brick-brick) collision, if the brick was turned
+ *
+ *BUG b) the falling brick is set the wrong way after a (brick-brick) collision, if the falling brick was turned
  *BUG c) destroying the old stones causes segfault -> WeakPointer as solution ?
- *BUG
+ *BUG d) wrong collision detection: sometimes stones "bounce off"
+ *BUG e) multiple rows are not cleared in one round
  *
  *TASK a) give points for winning
@@ -35,4 +36,5 @@
  *TASK d) save the highscore
  *TASK e) eye candy
+ *TASK f) increasing speed
  */
 
@@ -181,5 +183,5 @@
         for(std::vector<TetrisStone*>::const_reverse_iterator it = this->stones_.rbegin(); it != this->stones_.rend(); ++it)
         {
-            if(this->activeBrick_->contains(*it))
+            if(this->activeBrick_->contains(*it))//skip the moving brick' stones
                 continue;
             //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount());
@@ -187,4 +189,7 @@
             //!< Saves the position of the currentStone
 
+            //filter out cases where the falling stone is already below a steady stone
+            if(position.y < currentStonePosition.y - this->center_->getStoneSize()/2.0f)
+                continue;
             if((position.x == currentStonePosition.x) && (position.y < currentStonePosition.y + this->center_->getStoneSize()))
             {
@@ -274,4 +279,9 @@
     {
         this->activeBrick_->setVelocity(Vector3::ZERO);
+        if(this->activeBrick_ != NULL)
+        {
+            this->player_->stopControl();
+        }
+
         this->cleanup();
 
@@ -343,5 +353,5 @@
 
         // Apply the stone template to the stone.
-        brick->addTemplate(this->center_->getStoneTemplate()); // TODO: find error concerning the cameras
+        brick->addTemplate(this->center_->getBrickTemplate());
 
         // Attach the brick to the Centerpoint and set the position of the brick to be at the top middle.
@@ -386,5 +396,4 @@
     {
     	unsigned int correctPosition = 0;
-		orxout()<< "clear full rows ************ " <<endl;
     	unsigned int stonesPerRow = 0;
     	for (unsigned int row = 0; row < this->center_->getHeight(); row++)
@@ -395,7 +404,13 @@
             	correctPosition = static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize());
                 if(correctPosition == row)
-                	stonesPerRow++;
-                if(stonesPerRow == this->center_->getWidth())
-                    {orxout()<< "CANDIDATE FOUND in row " << row <<endl; clearRow(row);}
+                {
+                    stonesPerRow++;
+                    if(stonesPerRow == this->center_->getWidth())
+                    {
+                        clearRow(row);
+                        this->playerScored(this->player_);
+                    }
+                }
+
             }
 
@@ -404,15 +419,16 @@
 
     void Tetris::clearRow(unsigned int row)
-    {//std::vector<int>::iterator it = v.begin()
+    {// clear the full row
         for(std::vector<TetrisStone*>::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
         {
             if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row)
-            	(*it)->setPosition(Vector3(-10,-10,0));
+            	(*it)->setPosition(Vector3(-50,-50,100));
             	//{(*it)->destroy(); this->stones_.erase(it); orxout()<< "destroy row "<<endl;}//experimental
         }
-        for(std::vector<TetrisStone*>::const_reverse_iterator it2 = this->stones_.rbegin(); it2 != this->stones_.rend(); ++it2)
-        {
-            /*if(static_cast<unsigned int>(((*it2)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
-                (*it2)->setPosition((*it2)->getPosition()-Vector3(0,1,0));//*/
+      // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug.
+        for(std::vector<TetrisStone*>::iterator it2 = this->stones_.begin(); it2 != this->stones_.end(); ++it2)
+        {
+            if(static_cast<unsigned int>(((*it2)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
+                (*it2)->setPosition((*it2)->getPosition()-Vector3(0,10,0));
         }
 
Index: code/branches/pCuts/src/modules/tetris/TetrisBrick.h
===================================================================
--- code/branches/pCuts/src/modules/tetris/TetrisBrick.h	(revision 9087)
+++ code/branches/pCuts/src/modules/tetris/TetrisBrick.h	(revision 9089)
@@ -101,5 +101,4 @@
             Timer rotationTimer_; ///!< This timer is used to filter out multiple rotation inputs.
             Tetris* tetris_; //<! The Tetris class is responsible to initialize this value.
-           // TetrisCenterpoint* center_;
 
     };
