<commit_before>#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <string>
#include "world.h"
#include <sstream>
#include <algorithm>
#include <iterator>

using namespace std;

int main() {

	string userInput;
	World theShip;
	char inputKey;

	cout << "Welcome to Swashbuckler!" << endl;
	cout << "---------------------------------------------" << endl;
	cout << "You wake up in the ship, in the middle of the night, with a sound different than the usual snoring of the crew. Steps." << endl;
	cout << "With a quick look, you see the Captain passing silently between everyone. You notice a small letter with the navy seal falling from his pocket. THE NAVY SEAL?!" << endl;
	cout << "You wait until the captain goes back to his room and check the letter. Bad news. Very, very bad news." << endl;
	cout << "A true pirate would fight the Captain to take command of the ship and save your crew. A true pirate." << endl;
	cout << "LET'S GET OUT OF HERE!!" << endl;
	cout << "---------------------------------------------" << endl << ">";

	while (1) 
	{			
		if (_kbhit())
		{
			inputKey = _getch();
			
			if (inputKey == '\b')
			{
				if (userInput.size() > 0) userInput.pop_back();
				cout << '\b';
				cout << ' ';
				cout << '\b';
			}
			else if (inputKey == '\r')
			{
				istringstream iss(userInput);
				vector<string> tokens{ istream_iterator<string>{iss},
					istream_iterator<string>{} };
				
				std::cout << endl;
				cout << "---------------------------------------------" << endl;
				theShip.readInput(tokens);
				userInput.clear();
			}
			else
			{
				userInput = userInput + inputKey;
				cout << inputKey;
			}
		}

		if (theShip.mainguy->escaped)
		{
			theShip.ending();			
			break;
		}
	}

	std::cout << "---------------------------------------------" << std::endl;
	cout << "Thanks for playing Swashbuckler!" << endl << "See ya soon, landlubber!" << endl;
	cout << "<NAME>) Bravo" << endl;
	_getch();

	return 0;
}<commit_msg>The structure of the user input reading was slightly modified to perform in real time<commit_after>#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <string>
#include "world.h"
#include <sstream>
#include <algorithm>
#include <iterator>

using namespace std;

int main() {

	string userInput;
	World theShip;
	char inputKey;
	vector<string> tokens;

	std::cout << "Welcome to Swashbuckler! - The true pirates Zork-like game" << std::endl;
	std::cout << "---------------------------------------------" << std::endl;
	std::cout << "You wake up in the ship, in the middle of the night, with a sound different than the usual snoring of the crew. Steps." << std::endl;
	std::cout << "With a quick look, you see the Captain passing silently between everyone. You notice a small letter with the navy seal falling from his pocket. THE NAVY SEAL?!" << std::endl;
	std::cout << "You wait until the captain goes back to his room and check the letter. Bad news. Very, very bad news." << std::endl;
	std::cout << "A true pirate would fight the Captain to take command of the ship and save your crew. A true pirate." << std::endl;
	std::cout << "YOU BETTER GET OUT OF HERE SOON, LAD!!" << std::endl;
	std::cout << "---------------------------------------------" << std::endl << ">";

	theShip.worldTimer = clock();

	while (1) 
	{			
		if (_kbhit())
		{
			inputKey = _getch();
			
			if (inputKey == '\b')
			{
				if (userInput.size() > 0) userInput.pop_back();
				std::cout << '\b';
				std::cout << ' ';
				std::cout << '\b';
			}
			else if (inputKey == '\r')
			{
				string buf;
				stringstream ss(userInput);
				while (ss >> buf)
					tokens.push_back(buf);

				userInput.clear();
			}
			else
			{
				userInput = userInput + inputKey;
				std::cout << inputKey;
			}
		}

		if (theShip.worldTurn(tokens))
		{
			tokens.clear();
		}

		if (theShip.mainguy->escaped)
		{
			theShip.ending();			
			break;
		}
	}

	std::cout << "---------------------------------------------" << std::endl;
	std::cout << "Thanks for playing Swashbuckler!" << endl << "See ya soon, landlubber!" << std::endl;
	std::cout << "<NAME>) Bravo" << std::endl;
	_getch();

	return 0;
}
{'fraction_non_alphanumeric': 0.22021225277375783, 'fraction_numerical': 0.001447178002894356, 'mean_word_length': 2.415980230642504, 'pattern_counts': {'":': 0, '<': 145, '<?xml version=': 0, '>': 31, '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': '770472', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1287, 'n_words': 440}