// drawscreen.h
#ifndef DRAWSCREEN_H
#define DRAWSCREEN_H


class Game; 

class DrawScreen
{
	
public:
	DrawScreen();
	
	// screen initialisation members
	inline void setScreenYmax(const int &y) { screenYmax = y; }
	inline void setScreenXmax(const int &y) { screenXmax = y; }
	inline void setSectionRange(const int &i) { sectionRange = i; }
	inline void setCheckDistance(const int &i) { checkDistance = i; }
	inline void setNumOfSections(const int &i) { numOfSections = i; }
	inline void setSectionSize(const int &i) { sectionSize = i; }
	inline void setSectionTotal(const int &i) { sectionTotal = i; }
	inline void setSection(const int &i) { section = i; }
	inline int getScreenYmax() const { return screenYmax; }
	inline int getScreenXmax() const { return screenXmax; }
	inline int getSectionRange() const { return sectionRange; }
	inline int getCheckDistance() const { return checkDistance; }
	inline int getSmashDistance() const { return smashDistance; }
	inline int getNumOfSections() const { return numOfSections; }
	inline int getSectionSize() const { return sectionSize; }
	inline int getSectionTotal() const { return sectionTotal; }
	inline int getSection() const { return section; }
		
	/* platform is the last yx character location that the
	 * character stood on. used for camera to follow */
	inline void setPlatformY(const int &i) { platformY = i; }
	inline void setPlatformX(const int &i) { platformX = i; }
	inline int getPlatformX() const { return platformX; }
	inline int getPlatformY() const { return platformY; }
	
	// get key presses
	void grabKeys();
	inline int getKeyPressed() const { return keyPressed; }
		
	// camera and rotation
	inline void setCameraFocus(const int &i) { cameraFocus = i; }
	inline void setCameraSection(const int &i) { cameraSection = i; }
	inline void setCameraObject(const int &i) { cameraObject = i; }
	inline void setEditMode(const bool &i) { editMode = i; }
	inline int getCameraFocus() const { return cameraFocus; }
	inline int getCameraSection() const { return cameraSection; }
	inline int getCameraObject() const { return cameraObject; }
	inline bool getEditMode() const { return editMode; }
	void drawboard(std::vector<std::vector<Game>> & obj);
	void sectionLowTohigh(std::vector<std::vector<Game>> & obj, unsigned int &lowSection, unsigned int &highSection);

	// game information
	inline void setNumOfPlayers(const int & i) { numOfPlayers = i; }
	inline int getNumOfPlayers() const { return numOfPlayers; }
	void boardStats(std::vector<std::vector<Game>> & obj);

	
	// quit game?
	inline bool keepPlaying() const { return continuePlaying; }
	inline void setContinueGame(const bool &i) { continuePlaying = i; }
	
	friend class Game;
	
private:
	int keyPressed = 0;			// store key that is pressed
	bool continuePlaying = true;	// should we continue the game?
	bool editMode = false;		// puts in edit mode
	int numOfPlayers = 1;		// sets number of players

	// screen & collision
	int screenYmax;			// current y display screen size
	int screenXmax;			// current x display screen size
	int platformY = 0;		// the location of the platform under the player
	int platformX = 0;		// last platform stepped on
	int checkDistance = 100;	// how far to check for collisions
	int smashDistance = 0;	// distance at which a collision occurs
	
	// sectioning
	int sectionSize = 10;	// how wide are sections?
	int sectionTotal;		// how many sections in total?
	int numOfSections = 0;	// how many sections are there
	int section = 0;			// which section are we focusing on?
	
	// camera following
	int cameraFocus = 1;		// which player does camer follow?
	int cameraSection = 0;	// what section is this player in?
	int cameraObject = 0;	// what object number is the player?
	int sectionRange = 1;	// what range do we want to show at one time?
	int numberOfObjects;		// how many characters all together do we have?
	
};
#endif // drawscreen_H 
