// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// Sewer Glue

#include		"SewerGlue.hpp"
#define			eternity		(;;)

void			hbs::SewerGlue::Play(void)
{
  module[klondike]->Reset();
  for eternity
    {
      sf::Event		event;
      unsigned int	game_frame;

      game_frame = chrono.Time();
      if (game_frame)
	{
	  while (screen.pollEvent(event))
	    if (event.type == sf::Event::Closed)
	      return ;
	    else
	      if (module[klondike]->Event(event) != false || klondike == LAST_KLONDIKE)
		return ;
	  while (game_frame-- > 0)
	    if (module[klondike]->Play(chrono.GetDelay()) != false || klondike == LAST_KLONDIKE)
	      return ;
	  module[klondike]->Display(lowres_screen);
	  lowres_screen.display();
	  Display();
	}
    }
}
