Laid groundwork for creating a snake body

Laid groundwork for creating a snake body. Implementation should be added and working next push.
This commit is contained in:
TriantaTV 2022-07-25 16:12:11 -05:00
parent 3d8dcf23ac
commit c03b16f0e9
2 changed files with 11 additions and 10 deletions

View File

@ -26,33 +26,33 @@ void SnakeMovement(sf::Keyboard keyboard)
/*
if (keyboard.pressed(Left))
snakeHead.moveleft();
if (keyboard.pressed(Right))
snakeHead.moveRight();
if (keyboard.pressed(Down))
snakeHead.moveDown();
if (keyboard.pressed(Up))
snakeHead.moveUp();
if (!snakeHead.isTouchingFood())
snakeQueue.pop();
*/
return;
}
void Snake::ExtendSnake()
{
/*
snakeBody.push_back(newLocation);
*/
// Create a new deque RectangleShape without popping old
return;
}
void Snake::MoveSnake()
{
/*
head.snakeBody()
*/
// Create a new deque RectangleShape and pop old
// Todo: Depreciate ExtendSnake and just add a collision test
return;
}
Snake::Snake()
{
// Possibly unnecessary
// The big 3 could be used to create a fresh game state
return;
}
// SnakeNode::SnakeNode();

View File

@ -21,6 +21,7 @@ class Snake
{
private:
std::deque<sf::RectangleShape> snakeBody;
Snake();
public:
// Instead of popping like in MoveSnake()
// Simply add to deque