Files
ardugotchi/include/game.hpp
T
2026-04-29 00:11:35 +02:00

43 lines
665 B
C++

#pragma once
#include <LibPrintf.h>
#include "joystick.hpp"
#include "display.hpp"
#include "menu.hpp"
#define ACTION_INTERVAL 60000 // 1 minute
#define MAXIMUM_STAT 100
typedef struct {
bool dead;
bool menuOpen;
int hunger;
int joy;
int energy;
int cleanliness;
uint64_t lastActionTime;
bool shouldClear;
} GameState;
class Game {
public:
Game();
void begin();
void update();
void render();
protected:
void forceUpdate(String reason);
void feed();
void play();
void sleep();
void clean();
private:
GameState state;
Joystick joystick;
Display display;
String* items;
Menu menu;
};