// Author : Chris Tolley
// Date   : 7/28/2004
// Gene.h contains the class declaration for a gene class that generates
// a string of bytes to use in a GA

#if !defined(AFX_GENE_H__C5DEC211_297D_4B74_A3AF_171B939A2F6B__INCLUDED_)
#define AFX_GENE_H__C5DEC211_297D_4B74_A3AF_171B939A2F6B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
using std::vector;

//#include "Bug.h"
// Forward struct declaration
struct ThresholdValues;
struct PatrolPath;


class Gene  
{
public:
	// Default Constructor
	Gene() {};

	// Constructor
	Gene( const int length );

	// Copy Constructor
	Gene( const Gene& rhs );

	// Creates a gene from a group of threshold values and a patrol path
	Gene( const ThresholdValues& thresholds, const PatrolPath& path );

	// Destructor
	virtual ~Gene();

	// Copies this gene into a new gene and returns it.  Includes mutation
	Gene Polymerize() const;

	// Returns a pointer to the n'th element of the genotype
	inline unsigned char* at( const int n ) { return &m_ucGenotype[n]; };

	// Prints the gene to the screen
//	void Print();
private:
	// The string of bytes
	vector< unsigned char > m_ucGenotype;
};

#endif // !defined(AFX_GENE_H__C5DEC211_297D_4B74_A3AF_171B939A2F6B__INCLUDED_)
