#ifndef GAMEPICKNPOP_H
#define GAMEPICKNPOP_H

#include "game.h"

class cGamePickNPop : public cGame
{
DECLARE_SERIAL(cGamePickNPop);
public:
	static Real CRITTERMINRADIUS;
	static Real CRITTERMAXRADIUS;
	static Real CRITTERMAXSPEED;
		//See the comments on these statics in gamepicknpop.cpp, where they are intialized.
	static Real UNPACKEDJEWEL_MAXSPEED;
	static Real BLANK_EDGE_WEIGHT; 
	static Real PACKINGBOX_WEIGHT;
	static Real PACKINGBOX_TARGETBOX_SPACER_WEIGHT; 
	static Real BOX_LINEWIDTH_WEIGHT; 
	static COLORREF PACKINGBOX_FILLCOLOR;
	static COLORREF PACKINGBOX_LINECOLOR;
	static COLORREF TARGETBOX_FILLCOLOR;
	static COLORREF TARGETBOX_LINECOLOR;
	static Real JEWEL_WEIGHT;
	static int MAX_SCORE; 
	static Real JEWEL_GAME_SCORE_WEIGHT;
	static Real GAMETIME; //Number of seconds in a game.  Needs to be REal not int to match age().
	static int STARTCRITTERCOUNT;
	static Real JEWELBOXTOLERANCE;
protected:
	cRealBox _packingbox;
	cRealBox _targetbox;
public:
 //Accessors
	cRealBox targetbox(){return _targetbox;}
	cRealBox packingbox(){return _packingbox;}
//Overrides
	cGamePickNPop();
	virtual void Serialize(CArchive& ar);
	virtual void collideStep(){} /* Turns off critter collisions. */
	virtual void adjustGameParameters();
	virtual CString statusMessage();
	virtual void initializeView(CPopView *pview);
	virtual void initializeViewpoint(cCritterViewer *pviewer);
	virtual void drawBackground(cGraphics *pgraphics, int drawflags);
	virtual void drawForeground(cGraphics *pgraphics, int drawflags);
	virtual void seedCritters();
};

class cCritterPeanut : public cCritter //Basic bubble
{
DECLARE_SERIAL(cCritterPeanut); // This defines some useful CArchive serialization methods.
public:
//Constructors
	cCritterPeanut(cGame *pownergame = NULL);
//Overloads.
	virtual void update(CPopView *pactiveview, Real dt); //Kill off any z vel to be safe.
	virtual void die();
};

class cCritterJewel: public cCritter //Jewel
{
	DECLARE_SERIAL(cCritterJewel);
//Constructors
	cCritterJewel(cGame *pownergame = NULL);
//Overloads.
	virtual void die();
	virtual void update(CPopView *pactiveview, Real dt); /* If you're inside the pgame's _targetbox, convert 
		to cCritterUnpackedJewel. */
};

class cCritterUnpackedJewel : public cCritter //Unpacked Jewel
{
	DECLARE_SERIAL(cCritterUnpackedJewel);
//Constructors
	cCritterUnpackedJewel(cGame *pownergame = NULL);
	cCritterUnpackedJewel(cCritter *pbubble); // Use to convert a cCritterJewel.
//Overloads.
	virtual void update(CPopView *pactiveview, Real dt); //Kill off any z vel to be safe.
	virtual void die();
};

#endif //GAMEPICKNPOP_H