Changeset 10919 for code/branches/cpp11_v2/src/modules/tetris
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
r10917 r10919 136 136 return false; 137 137 138 for( std::list<StrongPtr<TetrisStone>>::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)139 { 140 const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone138 for(TetrisStone* someStone : this->stones_) 139 { 140 const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone 141 141 142 142 if((position.x == currentStonePosition.x) && abs(position.y-currentStonePosition.y) < this->center_->getStoneSize()) … … 192 192 193 193 // check for collisions with all stones 194 for( std::list<StrongPtr<TetrisStone>>::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)194 for(TetrisStone* someStone : this->stones_) 195 195 { 196 196 //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount()); 197 const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone197 const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone 198 198 199 199 //filter out cases where the falling stone is already below a steady stone
Note: See TracChangeset
for help on using the changeset viewer.