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: SnakeTail/SnakeTail.cpp
- Revision:
- 6:964cc4896627
- Parent:
- 5:256e5e0b6cd7
- Child:
- 7:c67a5c6a874f
--- a/SnakeTail/SnakeTail.cpp Thu May 14 12:06:26 2020 +0000
+++ b/SnakeTail/SnakeTail.cpp Tue May 19 10:18:14 2020 +0000
@@ -18,23 +18,7 @@
void SnakeTail::draw_tail(N5110 &lcd, Vector2D headPos)
{
- tailX[0] = headPos.x;
- tailY[0] = headPos.y;
- int prevX = tailX[0];
- int prevY = tailY[0];
- int prev2X = prevX;
- int prev2Y = prevY;
-
- for (int i = 1; i<_length; i++) {
- prev2X = prevX;
- prev2Y = prevY;
- prevX = tailX[i];
- prevY = tailY[i];
- tailX[i] = headPos.x;
- tailY[i] = headPos.y;
- lcd.drawRect(prev2X, prev2Y, 2, 2, FILL_BLACK);
- };
}