32 lines
640 B
C++
32 lines
640 B
C++
#pragma once
|
|
#include <Arduino.h>
|
|
#include "constants.hpp"
|
|
|
|
class Pet {
|
|
public:
|
|
Pet();
|
|
bool isAlive;
|
|
|
|
void updateHunger(int8_t delta);
|
|
void updateJoy(int8_t delta);
|
|
void updateEnergy(int8_t delta);
|
|
void updateCleanliness(int8_t delta);
|
|
|
|
int8_t getHunger() const;
|
|
int8_t getJoy() const;
|
|
int8_t getEnergy() const;
|
|
int8_t getCleanliness() const;
|
|
String getReasonForDeath() const;
|
|
|
|
byte getAnimationFrame();
|
|
private:
|
|
int8_t hunger;
|
|
int8_t joy;
|
|
int8_t energy;
|
|
int8_t cleanliness;
|
|
String reasonForDeath;
|
|
|
|
byte lastAnimationFrame;
|
|
uint64_t lastAnimationFrameTime;
|
|
};
|