G.U.L.L.S. rebuilt to use PlatformIO

This commit is contained in:
2024-07-01 19:18:45 -04:00
commit f934849576
55 changed files with 4082 additions and 0 deletions

36
include/RicochetHelper.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef RICOCHETHELPER_H
#define RICOCHETHELPER_H
#include "Arduino.h"
#include "FastLED.h"
class RicochetHelper {
public:
RicochetHelper() {}
RicochetHelper(int16_t _startPosX, int16_t _startPosY, int16_t _width, int16_t _height,
CRGB _color) : currentX(_startPosX), currentY(_startPosY), width(_width),
height(_height), xDir(random(0, 101) > 51 ? -1 : 1), yDir(random(0, 100) > 51 ? -1 : 1) {}
int16_t getCurrentXPos() { return currentX; }
int16_t getCurrentYPos() { return currentY; }
CRGB getCurrentColor() { return color; }
void setCurrentColor(uint16_t _color) { color = _color; }
void updatePositions();
private:
int16_t
currentX,
currentY,
width,
height;
int8_t
xDir,
yDir;
CRGB
color;
};
#endif