KlassischeKeplerKriege/game/state/player.hpp

37 lines
669 B
C++
Raw Normal View History

#pragma once
#include <deque>
#include <vector>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
namespace game {
class Ship;
class Command;
class Missile;
class Player {
public:
int id;
bool alive;
float energy;
float deadTimeCounter;
Ship *ship;
std::vector<Missile*> missiles;
Player(int id) : id(id), alive(true), energy(0.0), ship(nullptr)
{
}
void addCommand(Command *cmd);
bool hasCommandInQueue();
Command *peekCommand();
void popCommand();
private:
std::deque<Command*> commands;
};
}