mirror of
https://github.com/ProgramSnail/snake_2024.git
synced 2025-12-18 20:28:45 +00:00
modernization, better food rendering, consistent player moving, snake intersections
This commit is contained in:
parent
adabb50a9e
commit
b4509733da
8 changed files with 119 additions and 39 deletions
|
|
@ -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_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue