#include "cPlayerUp.hpp"

using Input::cPlayerUp;

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

cPlayerUp::~cPlayerUp()
{}

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

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

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