feat: implement basic tower placement

This commit is contained in:
2021-09-19 13:43:45 +02:00
parent bcde4278ab
commit 52a143769e
17 changed files with 318 additions and 52 deletions

View File

@@ -18,7 +18,9 @@ enum class TowerType : std::uint8_t{
Leach,
Turret,
Necromancer
Necromancer,
TowerCount
};
enum class TowerSize : bool{
@@ -64,8 +66,8 @@ public:
// operator to sort maps
friend bool operator<(const TowerLevel& level, const TowerLevel& other){
return level.getLevel() * (std::uint8_t)level.getPath() <
other.getLevel() * (std::uint8_t)other.getPath();
return level.getLevel() * static_cast<std::uint8_t>(level.getPath()) <
other.getLevel() * static_cast<std::uint8_t>(other.getPath());
}
};