Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 17, 2018, 11:50:25 PM (6 years ago)
Author:
landauf
Message:

[FlappyOrx_HS17] some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc

    r11759 r11760  
    142142
    143143        //Fill up triangle with asteroids
    144         while(noadd<5&&circlesUsed<nCircles){
     144        while(noadd<5&&circlesUsed<NUM_CIRCLES){
    145145            if(slope>0)
    146146                newAsteroid.y=rnd(150+y)-150;   //create asteroid on bottom
     
    187187    void FlappyOrx::clearCircles(){
    188188        circlesUsed=0;
    189         for(int i = 0; i<this->nCircles; i++){
     189        for(int i = 0; i<NUM_CIRCLES; i++){
    190190            circles[i].r=0;
    191191        }
     
    206206    int FlappyOrx::addIfPossible(Circle c){
    207207        int i;
    208         for(i=0; i<this->nCircles && this->circles[i].r!=0 && c.r>0;i++){
     208        for(i=0; i<NUM_CIRCLES && this->circles[i].r!=0 && c.r>0;i++){
    209209            while(circleCollision(c,this->circles[i])){
    210210                c.r-=5; //when it collides, try to make it smaller
Note: See TracChangeset for help on using the changeset viewer.