<commit_before>#include "Player.h"
#include "Input.h"
#include "Level.h"

Player::Player()
{
	m_Length = 3;
	m_Speed = 1;
	m_Direction = glm::vec2(1, 0);
	myQueue = new std::deque<PlayerBody>;
	
	PlayerBody temp = PlayerBody(1, 1, 4); // Tail
	myQueue->push_back(temp);
	Level::SetMap(1, 1, E_LevelSlot_SnakeTail);

	temp = PlayerBody(2, 1, 2); // Body
	myQueue->push_front(temp);
	Level::SetMap(2, 1, E_LevelSlot_SnakeBody);

	temp = PlayerBody(3, 1, 3); // Head
	myQueue->push_front(temp);
	Level::SetMap(3, 1, E_LevelSlot_SnakeHead);

	m_HeadPos = temp;
	m_lastDirection = m_Direction;
}

Player::~Player()
{
	delete myQueue;
}

void Player::Update(float dt)
{
	aie::Input* input = aie::Input::getInstance();

	// use arrow keys to move camera
	if (input->isKeyDown(aie::INPUT_KEY_UP))
		SetDirection('u');

	if (input->isKeyDown(aie::INPUT_KEY_DOWN))
		SetDirection('d');

	if (input->isKeyDown(aie::INPUT_KEY_LEFT))
		SetDirection('l');

	if (input->isKeyDown(aie::INPUT_KEY_RIGHT))
		SetDirection('r');
	
	static float timer = 0; 


	if (timer >= .2)
	{
		
		if (CheckCollision())
		{
			Reset();
		}

		TranslatePlayer();<commit_msg>uioguikvfukjvk<commit_after>#include "Player.h"
#include "Input.h"
#include "Level.h"

Player::Player()
{
	m_Length = 3;
	m_Speed = 1;
	m_Direction = glm::vec2(1, 0);
	myQueue = new std::deque<PlayerBody>;
	
	PlayerBody temp = PlayerBody(1, 1, 4); // Tail
	myQueue->push_back(temp);
	Level::SetMap(1, 1, E_LevelSlot_SnakeTail);

	temp = PlayerBody(2, 1, 2); // Body
	myQueue->push_front(temp);
	Level::SetMap(2, 1, E_LevelSlot_SnakeBody);

	temp = PlayerBody(3, 1, 3); // Head
	myQueue->push_front(temp);
	Level::SetMap(3, 1, E_LevelSlot_SnakeHead);

	m_HeadPos = temp;
	m_lastDirection = m_Direction;
}

Player::~Player()
{
	delete myQueue;
}

void Player::Update(float dt)
{
	aie::Input* input = aie::Input::getInstance();

	// use arrow keys to move camera
	if (input->isKeyDown(aie::INPUT_KEY_UP))
		SetDirection('u');

	if (input->isKeyDown(aie::INPUT_KEY_DOWN))
		SetDirection('d');

	if (input->isKeyDown(aie::INPUT_KEY_LEFT))
		SetDirection('l');

	if (input->isKeyDown(aie::INPUT_KEY_RIGHT))
		SetDirection('r');
	
	static float timer = 0; 


	if (timer >= .2)
	{
		
		if (CheckCollision())
		{
			Reset();
		}
		Eat();

		TranslatePlayer();
{'fraction_non_alphanumeric': 0.1759825327510917, 'fraction_numerical': 0.01921397379912664, 'mean_word_length': 4.844387755102041, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4512953', 'n_tokens_mistral': 997, 'n_tokens_neox': 916, 'n_words': 174}