class for obstacles in Car_race game
Diff: Obstacles.cpp
- Revision:
- 7:55d1306f5df5
- Parent:
- 6:44243b2bc27c
- Child:
- 8:c8007ccac5c0
diff -r 44243b2bc27c -r 55d1306f5df5 Obstacles.cpp --- a/Obstacles.cpp Tue Apr 11 22:37:40 2017 +0000 +++ b/Obstacles.cpp Mon Apr 17 20:45:19 2017 +0000 @@ -54,10 +54,10 @@ for (int i=1; i<83; i+=1) { for (int j=1; j<47; j+=1) { if ((pixelstate[i-1][j-1]) ) { - lcd.setPixel(i,j+1); + lcd.setPixel(i,j+2); } // CAN INCREASE THE SPEED BY ADDING 1 FOR Y VALUES if ((pixelstate[i-1][j-2]==0) ) { - lcd.setPixel(i,j,false); + lcd.setPixel(i,j+1,false); } } }