#include "simpleled.h"



void c_simpleLed::runGame(void)
{
  handleSimpleLed(false);
}

void c_simpleLed::initGame(void)
{
  initSimpleLed();
  setStatus(active);
}


extern std::vector<c_button *> buttonlist;

bool status = false;

void initSimpleLed(void)
{
  status = true;
}

void handleSimpleLed(bool newstate)
{
  for (auto &&button : buttonlist)
  {
    if (button->isPressed())
    {
      turnOnLed(button->getIndex());
    }
    else
    {
      turnOffLed(button->getIndex());
    }
  }
}

bool getStatusSimpleLed( void )
{
  return status;
}