#pragma once

#include "td/game/World.h"

namespace td {
namespace server {

class Server;
class ServerGame;

class ServerWorld : public game::World {
private:
	game::MobID m_CurrentMobID;
	game::TowerID m_CurrentTowerID;
	Server* m_Server;
public:
	static constexpr float MobSpawnBorder = 0.01f;

	ServerWorld(Server* server, ServerGame* game);

	void SpawnMobs(game::MobType type, std::uint8_t level, game::PlayerID sender, std::uint8_t count);
	game::TowerPtr PlaceTowerAt(game::TowerType type, std::int32_t x, std::int32_t y, game::PlayerID builder);

	virtual void OnMobDie(game::Mob* mob) override;
	virtual void OnMobCastleDamage(game::Mob* damager, game::TeamCastle* enemyCastle, float damage) override;

};

} // namespace server  
} // namespace td
