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
SnakeTail/SnakeTail.h
- Committer:
- sdlashmar
- Date:
- 2020-05-23
- Revision:
- 11:c4b740a970f8
- Parent:
- 7:c67a5c6a874f
- Child:
- 13:4fa0d5148216
File content as of revision 11:c4b740a970f8:
#ifndef SNAKETAIL_H
#define SNAKETAIL_H
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "SnakeHead.h"
class SnakeTail
{
public:
SnakeTail();
~SnakeTail();
void update(Vector2D headPos, int length);
void draw(N5110 &lcd, int length);
private:
int tailX[100];
int tailY[100];
int _x_init, _y_init, prevX, prevY, prev2X, prev2Y, _length;
};
#endif