12345678910111213141516171819202122232425262728 |
- // SPDX-License-Identifier: GPL-2.0-or-later
- #ifndef _SNAKE_SNAKE_HPP_
- #define _SNAKE_SNAKE_HPP_
- #include <list>
- #include <Snake/Position.hpp>
- #include <Snake/Direction.hpp>
- class Snake
- {
- public:
- Snake(); //stub constructor. Maybe final solution?
- Direction direction;
- std::list<Position> body;
- Position getNextPosition() const;
- bool isPartOf(const Position& position) const;
- void move();
- void grow();
- };
- #endif
|