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 ll16j23s_test_docs
Diff: SnakeBody/SnakeBody.cpp
- Revision:
- 7:dd84e0fab346
- Parent:
- 6:6c9453397f4a
- Child:
- 8:bcc3403d7e79
--- a/SnakeBody/SnakeBody.cpp Sat May 23 20:01:00 2020 +0000 +++ b/SnakeBody/SnakeBody.cpp Sun May 24 22:18:55 2020 +0000 @@ -92,13 +92,12 @@ } } -void SnakeBody::snake_snake_collision(Gamepad &pad, bool &death){ +void SnakeBody::snake_snake_collision(Gamepad &pad){ for(int i = 1; i < _length; i++) { if (_x_head == _body_x[i] && _y_head == _body_y[i]) { //checks if head coord is the same as any of the body coords pad.led(1,0.9); //printf("DEAD \n"); _state = 0; - death = true; //return true; } else { //pad.led(1,0.0);