KlassischeKeplerKriege/game/state/player.hpp

40 lines
771 B
C++
Raw Normal View History

#pragma once
2016-09-27 20:35:16 +00:00
#include <string>
#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;
2016-09-27 20:35:16 +00:00
float speed;
float energy;
float deadTimeCounter;
Ship *ship;
2016-09-27 20:35:16 +00:00
std::string name;
std::vector<Missile*> missiles;
2016-09-27 20:35:16 +00:00
Player(int id) : id(id), alive(true), speed(0.01), energy(0.0), ship(nullptr), name("<unnamed>")
{
}
void addCommand(Command *cmd);
bool hasCommandInQueue();
Command *peekCommand();
void popCommand();
private:
std::deque<Command*> commands;
};
}