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: Snake/Snake.cpp
- Revision:
- 5:b3ad78d527c7
- Parent:
- 4:5b1c3b7cd894
- Child:
- 6:53c1fda99a3a
--- a/Snake/Snake.cpp Mon Apr 30 21:32:35 2018 +0000
+++ b/Snake/Snake.cpp Mon Apr 30 23:37:41 2018 +0000
@@ -10,8 +10,17 @@
}
-void snake::init(){
+void snake::init(){
+ for (int i = 0; i <_point ; i++) {
+ _xoldpos[i] = 15;
+ _yoldpos[i] = 23;
+ _xnewpos[i] = 15 ;
+ _ynewpos[i] = 23;
+ }
+ dir = 0;
_array = 100;
+ _point = 6;
+}
@@ -28,4 +37,3 @@
-