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:
- 14:2dfe04ced21c
- Parent:
- 13:7b7ec5db56b2
--- a/SnakeBody/SnakeBody.cpp Wed May 27 00:59:14 2020 +0000
+++ b/SnakeBody/SnakeBody.cpp Wed May 27 03:18:16 2020 +0000
@@ -92,6 +92,7 @@
if(_length_increase > 0) { //converts length increase into length, one unit at a time
_length++;
_length_increase--;
+ //printf("L increase: %d\n", _length_increase);
}
}
@@ -133,7 +134,7 @@
{
head_x = 42;
head_y = 24;
- for(int i = 3; i < body_y.size(); i++) {
+ for(int i = 1; i < body_y.size(); i++) {
body_y.at(i) = 50; //moves all body coordinates off-screen
}
_length = 4;