Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Game/Game.cpp
- Revision:
- 14:d0650d0de063
- Parent:
- 13:c3b550fc2445
- Child:
- 15:a080c64cf301
diff -r c3b550fc2445 -r d0650d0de063 Game/Game.cpp --- a/Game/Game.cpp Sat May 04 19:33:08 2019 +0000 +++ b/Game/Game.cpp Mon May 06 14:13:09 2019 +0000 @@ -25,7 +25,16 @@ smiley.drawSprite(lcd); } -void Game::movement(Gamepad &pad, N5110 &lcd, mC col){ +void Game::collect(Smiley smiley,Coin coin,N5110 &lcd){ + int x_coin; + int y_coin; + if(smiley.get_x_char() + 7 == coin.get_x_coin() && smiley.get_y_char() + 7 == coin.get_y_coin()){ + x_coin = 100; + y_coin = 100; + } +} + +void Game::movement(Gamepad &pad, N5110 &lcd){ smiley.movement(dir,lcd); enemy1.movement(lcd); enemy2.movement(lcd);