KlassischeKeplerKriege/game/state/player.cpp

34 lines
559 B
C++
Raw Normal View History

#include "player.hpp"
#include <iostream>
#include "commands.hpp"
#include "ship.hpp"
namespace game {
void Player::popCommand()
{
//std::cout<<"popCommand()" << std::endl;
Command *cmd = commands.front();
commands.erase(commands.begin());
delete(cmd);
}
Command *Player::peekCommand()
{
return commands.front();
}
bool Player::hasCommandInQueue()
{
return !commands.empty();
}
void Player::addCommand(Command *cmd)
{
commands.push_back(cmd);
}
}