<commit_before>#include "Condition.h"
#include "Instruction.h"

CCondition::CCondition(CGameState &_gameState, FCLInstructionVector _instructions, bool _isAnimator)
{
	gameState = &_gameState;
	instructions = _instructions;
	isAnimator = _isAnimator;
}

bool CCondition::statusOfConditional(FCLInstruction &conditional)	//CObject *obj,
{
	int32_t var1, var2;
	bool result = false;

	switch(conditional.getType())
	{
		default:
			std::cerr << "Unknown conditional" << &conditional;
		break;

		/*
			Collided, shot and activated all atomically test and reset object state bits;
			so they delegate determining the result to the object itself
		*/
//		case COLLIDEDQ:
//			Res = obj ? obj->GetCollided() : true;
//			if(obj) obj->SetCollided(false);
//		return Res;
//		case SHOTQ:
//			Res = obj ? obj->GetShot() : false;
//			if(obj) obj->SetShot(false);
//		return Res;
//		case ACTIVATEDQ:
//			Res = obj ? obj->GetActivated() : false;
//			obj->SetActivated(false);	// not sure about this
//		return Res;

		/*
			Visibility and, therefore, invisibility, depend on the scene's current state,
			and we want the scene graph to do the complicated maths anyway...
		*/
//		case VISQ:
//			Var2 = Parent->GetCurrentArea();
//			GetBinaryValues(Conditional, Var1, Var2);
//		return Parent->GetVis(Var1, Var2);<commit_msg>Fixed an erroneous comment. Visibility is just a flag that lives on the object. It’s not line of sight.<commit_after>#include "Condition.h"
#include "Instruction.h"

CCondition::CCondition(CGameState &_gameState, FCLInstructionVector _instructions, bool _isAnimator)
{
	gameState = &_gameState;
	instructions = _instructions;
	isAnimator = _isAnimator;
}

bool CCondition::statusOfConditional(FCLInstruction &conditional)	//CObject *obj,
{
	int32_t var1, var2;
	bool result = false;

	switch(conditional.getType())
	{
		default:
			std::cerr << "Unknown conditional" << &conditional;
		break;

		/*
			Collided, shot and activated all atomically test and reset object state bits;
			so they delegate determining the result to the object itself
		*/
//		case COLLIDEDQ:
//			Res = obj ? obj->GetCollided() : true;
//			if(obj) obj->SetCollided(false);
//		return Res;
//		case SHOTQ:
//			Res = obj ? obj->GetShot() : false;
//			if(obj) obj->SetShot(false);
//		return Res;
//		case ACTIVATEDQ:
//			Res = obj ? obj->GetActivated() : false;
//			obj->SetActivated(false);	// not sure about this
//		return Res;

		/*
			Visibility and invisibility need working objects ...
		*/
//		case VISQ:
//			Var2 = Parent->GetCurrentArea();
//			GetBinaryValues(Conditional, Var1, Var2);
//		return Parent->GetVis(Var1, Var2);
{'fraction_non_alphanumeric': 0.13467374810318664, 'fraction_numerical': 0.006828528072837633, 'mean_word_length': 3.7089285714285714, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '6914105', 'n_tokens_mistral': 965, 'n_tokens_neox': 913, 'n_words': 243}