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:
parent
3d8dcf23ac
commit
c03b16f0e9
@ -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();
|
||||
|
@ -21,6 +21,7 @@ class Snake
|
||||
{
|
||||
private:
|
||||
std::deque<sf::RectangleShape> snakeBody;
|
||||
Snake();
|
||||
public:
|
||||
// Instead of popping like in MoveSnake()
|
||||
// Simply add to deque
|
||||
|
Loading…
Reference in New Issue
Block a user