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/Coin_files/Coin.cpp
- Revision:
- 16:4e49f5cb972e
- Parent:
- 11:5a6b9dffd78a
diff -r a65444eb1194 -r 4e49f5cb972e Game_one/Coin_files/Coin.cpp --- a/Game_one/Coin_files/Coin.cpp Sat Apr 20 11:53:09 2019 +0000 +++ b/Game_one/Coin_files/Coin.cpp Sat Apr 20 15:20:43 2019 +0000 @@ -16,7 +16,7 @@ int position = rand() % 4; // randomise initial direction. - // 4 possibilities. Get random modulo and set velocities accordingly + // 4 possibilities. Get random modulo and set initial position accordingly if (position == 0) { _x = -9; _y = 1; @@ -48,7 +48,7 @@ {0,0,1,1,0,0,0,1,0,0}, {0,0,0,1,1,1,1,0,0,0}, }; - + // Sprite for the coin object lcd.drawSprite(_x, _y, 12, 10, (int*)coin_data); }