modernization, better food rendering, consistent player moving, snake intersections

This commit is contained in:
programsnail 2024-07-22 23:20:20 +03:00
parent adabb50a9e
commit b4509733da
8 changed files with 119 additions and 39 deletions

View file

@ -21,6 +21,12 @@ public:
void draw(Veci offset = {}) const;
//
Veci get_pos() { return pos; }
//
size_t get_length() { return length; }
void set_length(size_t length) { this->length = length; }
@ -33,6 +39,10 @@ public:
}
}
//
bool touches(const Worm &other);
protected:
std::deque<Veci> track_;
};