Added effect "snake".

This commit is contained in:
2019-05-31 05:45:07 +02:00
parent 36663cf067
commit a2fe1461ad
5 changed files with 73 additions and 0 deletions

21
include/effect_snake.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef effect_snake_H
#define effect_snake_H
#include "Effect.h"
#include "prototypes.h"
class SnakeEffect : public Effect {
private:
Coords coords;
uint8_t direction;
uint8_t hue;
uint8_t run;
Window window = {0, 0, LED_WIDTH, LED_HEIGHT-6};
public:
void loop();
boolean valid_position(Coords c);
Coords update_position(Coords c, uint8_t direction);
boolean can_be_shown_with_clock();
};
#endif