<commit_before>/*
 *  AbsMapUnit.h
 *  hog2
 *
 *  Created by <NAME> on 4/27/07.
 *  Copyright 2007 <NAME>, University of Alberta. All rights reserved.
 *
 */

#ifndef ABSMAPUNIT_H
#define ABSMAPUNIT_H

#include "Unit.h"
#include "Map2DEnvironment.h"

typedef Unit<xyLoc, tDirection, AbsMapEnvironment> BaseAbsMapUnit;

/**
* A simple map-based unit
 */


class AbsMapUnit : public Unit<xyLoc, tDirection, AbsMapEnvironment> {
public:
	AbsMapUnit(int x, int y)
	:loc(x, y) { r = 1.0; g = 0; b = 0;}
	virtual ~AbsMapUnit() {}
	
	virtual void UpdateLocation(AbsMapEnvironment *, xyLoc &l, bool, SimulationInfo *)
	{ loc = l; }
	virtual void GetLocation(xyLoc &l)
	{ l = loc; }
	virtual void OpenGLDraw(int window, AbsMapEnvironment *, SimulationInfo *);
	//void GetLocation(int &x, int &y) { x = loc.x; y = loc.y; }
	void SetColor(GLfloat _r, GLfloat _g, GLfloat _b) { r=_r; g=_g; b=_b; }
	void GetColor(GLfloat& _r, GLfloat& _g, GLfloat& _b) { _r=r; _g=g; _b=b; }
protected:
	GLfloat r, g, b;
	xyLoc loc;
};

#endif<commit_msg>Minor changes<commit_after>/*
 *  AbsMapUnit.h
 *  hog2
 *
 *  Created by <NAME> on 4/27/07.
 *  Copyright 2007 <NAME>, University of Alberta. All rights reserved.
 *
 */

#ifndef ABSMAPUNIT_H
#define ABSMAPUNIT_H

#include "Unit.h"
#include "Map2DEnvironment.h"

typedef Unit<xyLoc, tDirection, AbsMapEnvironment> BaseAbsMapUnit;

/**
* A simple map-based unit
 */

class AbsMapUnit : public Unit<xyLoc, tDirection, AbsMapEnvironment> {
public:
	AbsMapUnit(int x, int y)
	:loc(x, y) { r = 1.0; g = 0; b = 0;}
	virtual ~AbsMapUnit() {}
	
	virtual const char *GetName() = 0;
	virtual tDirection MakeMove(AbsMapEnvironment *, OccupancyInterface<xyLoc, tDirection> *, SimulationInfo *) = 0;
	virtual void UpdateLocation(AbsMapEnvironment *, xyLoc &l, bool, SimulationInfo *)
	{ loc = l; }
	virtual void GetLocation(xyLoc &l)
	{ l = loc; }
	virtual void GetGoal(xyLoc &s) = 0;
	virtual void OpenGLDraw(int window, AbsMapEnvironment *, SimulationInfo *);
	//void GetLocation(int &x, int &y) { x = loc.x; y = loc.y; }
	void SetColor(GLfloat _r, GLfloat _g, GLfloat _b) { r=_r; g=_g; b=_b; }
	void GetColor(GLfloat& _r, GLfloat& _g, GLfloat& _b) { _r=r; _g=g; _b=b; }
protected:
	GLfloat r, g, b;
	xyLoc loc;
};

#endif
{'fraction_non_alphanumeric': 0.14387846291331546, 'fraction_numerical': 0.014745308310991957, 'mean_word_length': 4.243559718969555, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '790120', 'n_tokens_mistral': 902, 'n_tokens_neox': 864, 'n_words': 243}