Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2012, 5:45:44 PM (12 years ago)
Author:
jo
Message:

Still a long way to go. A short todo list can be found at the beginning of Tetric.cc. A first, buggy clear-row function has been implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pCuts/src/modules/tetris/TetrisBrick.cc

    r9086 r9087  
    4040#include "TetrisStone.h"
    4141#include "Tetris.h"
     42#include "util/Math.h"
    4243
    4344namespace orxonox
     
    5253    {
    5354        RegisterObject(TetrisBrick);
    54 
    55         this->shapeIndex_ = 4; //<! TODO: random number between 0 and 7
     55        this->shapeIndex_ = static_cast<unsigned int>(rnd(7.0f)); //<! random number between 0 and 7
    5656        this->stonesPerBrick_ = 4; //<! most tetris bricks is formed by 4 stones
    5757        this->delay_ = false;
     
    105105    void TetrisBrick::formBrick(TetrisStone* stone, unsigned int i)
    106106    {
    107         if(i != 0 && this->shapeIndex_ == 0)
    108             orxout() << "So it has come to this in TetrisBrick.cc"<< endl;
    109107        if(i == 0) //setting the first stone as
    110108        {
Note: See TracChangeset for help on using the changeset viewer.