![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Final Submission. I have read and agreed with Statement of Academic Integrity.
Dependencies: mbed Gamepad N5110 Joystick
Diff: Snake/Snake.cpp
- Revision:
- 2:0bd6711eae26
- Parent:
- 1:b9f3b7d869d8
- Child:
- 3:660de4311976
--- a/Snake/Snake.cpp Wed May 08 19:32:05 2019 +0000 +++ b/Snake/Snake.cpp Wed May 08 21:26:27 2019 +0000 @@ -15,3 +15,13 @@ lcd.drawRect(_snake_posX,_snake_posY,4,4,FILL_BLACK); // Draws snake head } +void Snake::set_snake_posX(int snake_posX) {_snake_posX = snake_posX;} // mutators allow changing snake position +void Snake::set_snake_posY(int snake_posY) {_snake_posY = snake_posY;} + +// accessors +int Snake::get_snake_posX() { + return _snake_posX; +} +int Snake::get_snake_posY() { + return _snake_posY; +}