#pragma once

#include "Player.h"
#include <map>

namespace blitz {
namespace game {

typedef std::map<PlayerID, Player> PlayerMap;

class Game {
  private:
	PlayerMap m_Players;

  public:
	Game() {}

	virtual void Tick(std::uint64_t delta) = 0;

	Player* GetPlayerById(PlayerID id);
	const Player* GetPlayerById(PlayerID id) const;

	PlayerMap& GetPlayers() {
		return m_Players;
	}

	const PlayerMap& GetPlayers() const {
		return m_Players;
	}

	void AddPlayer(PlayerID player, const std::string& name);
	void RemovePlayer(PlayerID player);
};


}  // namespace game
}  // namespace blitz
