#ifndef SESSION_H
#define SESSION_H

#include "Param.h"

#include "../graphics/shippingHandler.h"
#include "../interface/LocalInputCollection.h"
#include "../interface/HitBox.h"
#include "../interface/PowerSelector.h"
#include "../interface/TextContainer.h"

class Renderer;
class StateHandler;
class Rules;

//Session is a param, but should be unique.
class Session : public Param {
 public:
  Session();
  ~Session();

  //Param handling
  void initParams ();
  Param * getParamOld ();
  Param * getParamNew ();
  //swaps parameters, used when transferring between states.
  void swapParams();
  void passOldHashToNewInt (const string &);
  void passOldHashToNewBool (const string &);
  void passOldHashToNewString (const string &);

  //shippingHandler
  shippingHandler * getShippingHandler ();
  void setShippingHandler (shippingHandler *);

  //playerInput
  LocalInputCollection & getPlayerInput ();

  //Renderer
  Renderer * getRenderer();
  void setRenderer(Renderer *);

  //StateHandler
  StateHandler * getStateHandler();
  void setStateHandler(StateHandler *);

  //Rules
  Rules * getRules();
  void setRules(Rules *);

  //HitBox
  vector<HitBox> & getHitBoxes();

  //PowerSelector
  PowerSelector * getPowerSelector();

  //TextContainer
  TextContainer * getTextContainer();

 private:
  Param paramA, paramB;
  Param *paramOld, *paramNew;

  LocalInputCollection playerInput;
  shippingHandler * sdlRE;
  Renderer * rander;
  StateHandler * sh;
  Rules * rulez;

  vector <HitBox> hitboxes;

  PowerSelector pwrSelector;
  TextContainer tc;
};

#endif
