<commit_before>#include "activeunit.h"

ActiveUnit::ActiveUnit(int unit, int action, int timer)
	: unit((UnitName)unit), action((ActionName)action), timer(timer)
{
	//
}

bool ActiveUnit::isAvailable() {
	if (action == ActionName::Idle || action == ActionName::Gather_Minerals)
		return true;
	return false;
}

void ActiveUnit::setActionTravelling(int time) {
	action = ActionName::Travelling;
	timer = time;
}

void ActiveUnit::setActionBuild(int time) {
	action = ActionName::Build;
	timer = time;
}

void ActiveUnit::setActionIdle() {
	action = ActionName::Idle;
	timer = -1;
}

void ActiveUnit::setActionGatherMinerals(int time) {
	action = ActionName::Gather_Minerals;
	timer = time;
}

void ActiveUnit::setActionGatherGas(int time) {
	action = ActionName::Gather_Gas;
	timer = time;
}<commit_msg>bwbot needs to handle non-unit commands. buildhandler needs a separate unithandler<commit_after>#include "activeunit.h"

ActiveUnit::ActiveUnit(int unit, int action, int timer)
	: unit((UnitName)unit), action((ActionName)action), timer(timer)
{
	//
}

void ActiveUnit::setActionTravelling(int time) {
	action = ActionName::Travelling;
	timer = time;
}

void ActiveUnit::setActionBuild(int time) {
	action = ActionName::Build;
	timer = time;
}

void ActiveUnit::setActionIdle() {
	action = ActionName::Idle;
	timer = -1;
}

void ActiveUnit::setActionGatherMinerals(int time) {
	action = ActionName::Gather_Minerals;
	timer = time;
}

void ActiveUnit::setActionGatherGas(int time) {
	action = ActionName::Gather_Gas;
	timer = time;
}

bool ActiveUnit::isAvailable() {
	if (action == ActionName::Idle || action == ActionName::Gather_Minerals)
		return true;
	return false;
}
{'fraction_non_alphanumeric': 0.13389121338912133, 'fraction_numerical': 0.001195457262402869, 'mean_word_length': 6.123404255319149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4182552', 'n_tokens_mistral': 585, 'n_tokens_neox': 577, 'n_words': 122}