<commit_before>#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <chrono>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <sys/stat.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/msg.h>
#include <unistd.h>

#include "entity.h"
#include "character.h"
#include "monster.h"
#include "spell.h"
#include "item.h"
#include "tile.h"
#include "timetable.h"
#include "mailbox.h"

using namespace std;

//Structure for HTTP form data
struct FormInfo{
	string Key;
	string Value;
};

vector<Tile> Map; //[][]
vector<Enemy> SpawnedEnemies; // []
vector<Character> Players;

//Vector to hold Key / Value pairs after processing
vector<FormInfo> FormData;

void getFormData(string Env);
string GetValueFromKey(string FindKey);

int main(){
	//Setup Game state
	TimeTable TimeTable;
	Mailbox Mailbox;
	bool Done = false;
	string FormData;
	string Action;
	
	//Load maps
	
	//Load definitions
	cout << "Beginning main loop\n" << flush;
	cout << "Mailbox: " << Mailbox.SetupSuccessful() << "\n" << flush;
	//Main Loop
	while (!Done){
		FormData.clear();
		
		//Check Time table.  Perform function for all expired times
		
		//Check and Process Messages
		FormData = Mailbox.GetNextMessage();
		if (FormData.size() > 5) { cout << FormData; }
		getFormData(FormData);
		Action = GetValueFromKey("Action");
		
		if (Action == "EnterGame"){
			Character NewChar(GetValueFromKey("u"), GetValueFromKey("c"), stoi(GetValueFromKey("Box")));
			Mailbox.OpenUserBox(NewChar.Box);
			Mailbox.BroadcastMessage("This is a test of the server.");
			Mailbox.SendMessageToBox("Specific User Message", NewChar.Box);
			cout << "Intelligence:" << .GetStat(Intelligence, true);
			Players.push_back(NewChar);
		}
		
		if (Action == "LeaveGame"){
		}
		
		if (Action == "Move"){
		}	<commit_msg>Setting up server-client comms<commit_after>#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <chrono>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <sys/stat.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/msg.h>
#include <unistd.h>

#include "entity.h"
#include "character.h"
#include "monster.h"
#include "spell.h"
#include "item.h"
#include "tile.h"
#include "timetable.h"
#include "mailbox.h"

using namespace std;

//Structure for HTTP form data
struct FormInfo{
	string Key;
	string Value;
};

vector<Tile> Map; //[][]
vector<Enemy> SpawnedEnemies; // []
vector<Character> Players;

//Vector to hold Key / Value pairs after processing
vector<FormInfo> FormData;

void getFormData(string Env);
string GetValueFromKey(string FindKey);

int main(){
	//Setup Game state
	TimeTable TimeTable;
	Mailbox Mailbox;
	bool Done = false;
	string FormData;
	string Action;
	
	//Load maps
	
	//Load definitions
	cout << "Beginning main loop\n" << flush;
	cout << "Mailbox: " << Mailbox.SetupSuccessful() << "\n" << flush;
	//Main Loop
	while (!Done){
		FormData.clear();
		
		//Check Time table.  Perform function for all expired times
		
		//Check and Process Messages
		FormData = Mailbox.GetNextMessage();
		if (FormData.size() > 5) { cout << FormData; }
		getFormData(FormData);
		Action = GetValueFromKey("Action");
		
		if (Action == "EnterGame"){
			Character NewChar(GetValueFromKey("u"), GetValueFromKey("c"), stoi(GetValueFromKey("Box")));
			Mailbox.OpenUserBox(NewChar.Box);
			Mailbox.BroadcastMessage("This is a test of the server.");
			Mailbox.SendMessageToBox("Specific User Message", NewChar.Box);
			cout << "Intelligence:" << NewChar.GetStat(Intelligence, true);
			Players.push_back(NewChar);
		}
		
		if (Action == "LeaveGame"){
		}
		
		if (Action == "Move"){
		}	
{'fraction_non_alphanumeric': 0.15444325481798715, 'fraction_numerical': 0.0005353319057815846, 'mean_word_length': 4.536296296296296, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 43, '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': '554854', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1280, 'n_words': 343}