#include "GameState.h"

void GameState :: gamestateBattleGameOverAfterDraw (uint8_t numberOfButtonsToHandle)
{
  inputBufferIterator = inputBuffer.begin ();
  while (inputBufferIterator < inputBuffer.end ())
    {
      if (SDL_GetTicks () >= 1000 + startTime && inputBufferIterator -> getInput () == INPUT_MOUSEUP)
        {
          setNewGameState (GAMESTATE_MAIN_MENU);
          rulez.clearIntroBattle ();
          rulez.deleteBattle ();

          //you should delete the game data as well here.
          clearButtons (numberOfButtonsToHandle);
          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[0], false))
            {
              setNewGameState (GAMESTATE_GAME_MENU);
            }
        }
      if (inputBufferIterator -> getInput () == INPUT_MOUSEDOWN)
        {
          buttonUpdateClickStatus ((*inputBufferIterator), numberOfButtonsToHandle);
        }
      if (inputBufferIterator -> getInput () == INPUT_QUITGAME)
        {
          addQuitCommand ();
        }
      inputBufferIterator ++;
    }
}
