/**
 * \file State.h
 * \date 14.04.2003
 *
 * Game state
 */

#ifndef COMMON_WORLD_STATE_H
#define COMMON_WORLD_STATE_H

#include "Player/World/WorldObject.h"
#include "Common/World/Types.h"

/**
 * \class State
 * \author Matus Horvath
 * \brief Game state in world model
 * 
 * Information about game state.
 */
class State : public WorldObject
{
public:
	// Construction and destruction
	State(World* w);
	State(const State& state);
	virtual State& operator=(const State&);
	virtual ~State();

	// State information
	int GetSimTime() const { return simTime; }
	PlayMode GetPlayMode() const { return playMode; }
	int GetOurScore() const { return ourScore; }
	int GetTheirScore() const { return theirScore; }
	
	void SetSimTime(int t) { simTime = t; }
	void SetPlayMode(PlayMode pm) { playMode = pm; }
	void SetScore(int our, int their) { ourScore = our; theirScore = their; }
	
	// Operations on state
	bool IsTimeStoped() const;
	bool IsOurKickIn() const;

private:
	int simTime;
	PlayMode playMode;
	
	int ourScore;
	int theirScore;

};

#endif // COMMON_WORLD_STATE_H
