Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
Diff: Game_one/Object_files/Object.cpp
- Revision:
- 16:4e49f5cb972e
- Parent:
- 2:464c7e62d97d
--- a/Game_one/Object_files/Object.cpp Sat Apr 20 11:53:09 2019 +0000 +++ b/Game_one/Object_files/Object.cpp Sat Apr 20 15:20:43 2019 +0000 @@ -14,9 +14,9 @@ { _speed = speed; - int position = rand() % 3; // randomise initial direction. + int position = rand() % 3; // randomise initial position. - // 4 possibilities. Get random modulo and set velocities accordingly + // 3 possibilities. Get random modulo and set initial position accordingly if (position == 0) { _x = -9; _y = 1; @@ -49,7 +49,7 @@ 0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1, 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1 }; - + // Sprite for the block object lcd.drawSprite(_x, _y, 16, 17, Object_data); }