#include "cPlayerDown.hpp"

using Input::cPlayerDown;

cPlayerDown::cPlayerDown( SDL_Keycode key, Equipment::cPaddle** player )
: cKey( key ), mpp_player(player)
{}

cPlayerDown::~cPlayerDown()
{}

///Funtions
void cPlayerDown::KeyPress()
{}

void cPlayerDown::KeyUP()
{
	if (mpp_player != nullptr && *mpp_player != nullptr)
	{
		if ((*mpp_player)->getState() == Equipment::cPaddle::Down)
			(*mpp_player)->setState(Equipment::cPaddle::Still);
	}
	
}

void cPlayerDown::KeyDown()
{
	if (mpp_player != nullptr && *mpp_player != nullptr)
		(*mpp_player)->setState(Equipment::cPaddle::Down);
}