2021-01-03 16:12:47 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "edge.h"
|
|
|
|
#include "corner.h"
|
|
|
|
|
|
|
|
class Node {
|
2021-01-04 10:39:46 +00:00
|
|
|
private:
|
|
|
|
uint16_t _number;
|
2021-01-03 16:12:47 +00:00
|
|
|
public:
|
|
|
|
Node* neighbours[CORNERS_PER_PART];
|
|
|
|
Edge* edges[CORNERS_PER_PART];
|
2021-01-04 11:44:41 +00:00
|
|
|
Corner* _corners[CORNERS_PER_PART];
|
2021-01-04 10:39:46 +00:00
|
|
|
Node(uint16_t number);
|
2021-01-03 16:12:47 +00:00
|
|
|
Node* create_neighbour(uint8_t edge);
|
2021-01-06 10:51:11 +00:00
|
|
|
|
|
|
|
void blend_to(CRGB color, uint16_t effect_id=0, uint8_t effect_speed=0);
|
|
|
|
void set_color(CRGB color);
|
2021-01-08 10:30:10 +00:00
|
|
|
void infect(uint16_t level);
|
2021-01-06 10:51:11 +00:00
|
|
|
void step();
|
|
|
|
void draw();
|
2021-01-03 16:12:47 +00:00
|
|
|
};
|