func (snake *Snake) Move() {
	currentPosition := snake.GetHead()
	newPosition := Position{currentPosition.X, currentPosition.Y}
	switch snake.direction {
	case Direction{-1, 0}:
		newPosition.X--
	case Direction{1, 0}:
		newPosition.X++
	case Direction{0, -1}:
		newPosition.Y--
	case Direction{0, 1}:
		newPosition.Y++
	}
	if snake.CheckHitbox(newPosition) {
		snake.dead = true
		return
	}
	if snake.length > len(snake.body) {
		snake.body = append(snake.body, newPosition)
	} else {
		snake.body = append(snake.body[1:], newPosition)
	}
}
Move the snake one coordinate along its current direction
package snake
type Snake struct {
	length int
	body []Position
	direction Direction
	dead bool
}
func NewSnake(position Position, direction Direction) *Snake {
	snake := &Snake{}
	snake.length = 2
	snake.body = []Position{
		Position{position.X, position.Y - 1},
		position,
	}
	snake.direction = direction
	snake.dead = false
	return snake
}
func (snake *Snake) IncrementSize() {
	snake.length++
}
func (snake *Snake) CheckHitbox(position Position) bool {
	for _, p := range snake.body {
		if p == position {
			return true
		}
	}
	return false
}
func (snake *Snake) GetHead() Position {
	return snake.body[len(snake.body)-1]
}
func (snake *Snake) UpdateDirection(direction Direction) {
	if snake.direction.X-direction.X == 0 || snake.direction.Y-direction.Y == 0 {
		return
	}
	snake.direction = direction
}