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.
Diff: Snek/Snek.cpp
- Revision:
- 2:9ca5e1c221c3
- Parent:
- 1:a14415de3ad5
- Child:
- 3:6253a2d374fa
--- a/Snek/Snek.cpp Mon Apr 16 09:07:17 2018 +0000 +++ b/Snek/Snek.cpp Mon Apr 16 10:55:00 2018 +0000 @@ -11,13 +11,24 @@ } -void Snek::init() +void Snek::init(int x, int y) { //Inital values for variables + _x = x; + _y = y; } -void Snek::draw(N5110 &lcd) +void Snek::update(Direction d) +{ + _direction = d; +} + +int Snek::getX() { - //Drawing of snake occures here + return _x; +} -} \ No newline at end of file +int Snek::getY() +{ + return _y; +}