You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
475 B

#pragma once
#include <memory>
#include "../input-output/Graphics.h"
#include "../components/Snake.h"
#include "../components/Point.h"
static constexpr int DEFEAT = -1;
class Controller {
private:
Snake snake_;
Point snack_;
int input_;
uint32_t score_;
void printScore(uint32_t score) const;
public:
Controller();
uint32_t getCurrScore() const;
void resetScore();
int readInput();
int act();
bool wantsToQuit() const;
};