2020-02-19 12:50:09 -05:00
|
|
|
#include "level.h"
|
|
|
|
|
|
|
|
Level::Level()
|
2020-02-25 11:53:57 -05:00
|
|
|
{}
|
2020-02-20 13:34:41 -05:00
|
|
|
|
2020-02-21 09:13:12 -05:00
|
|
|
void Level::placeBridge(coordinate x, coordinate y)
|
2020-02-20 13:34:41 -05:00
|
|
|
{
|
2020-02-21 09:20:40 -05:00
|
|
|
map[x][y] = CellType::Bridge;
|
2020-02-20 13:34:41 -05:00
|
|
|
}
|
|
|
|
|
2020-02-25 11:53:57 -05:00
|
|
|
CellType Level::cellOfType(coordinate x, coordinate y) const
|
2020-02-20 13:34:41 -05:00
|
|
|
{
|
2020-02-25 11:53:57 -05:00
|
|
|
return map[x][y];
|
2020-02-20 13:34:41 -05:00
|
|
|
}
|
|
|
|
|
2020-02-21 09:13:12 -05:00
|
|
|
void Level::removeCharge(coordinate x, coordinate y)
|
2020-02-20 13:34:41 -05:00
|
|
|
{
|
2020-02-21 09:20:40 -05:00
|
|
|
map[x][y] = CellType::Ground;
|
2020-02-19 12:50:09 -05:00
|
|
|
}
|
2020-02-21 16:55:13 -05:00
|
|
|
|
|
|
|
Map& Level::mapArray()
|
|
|
|
{
|
|
|
|
return map;
|
|
|
|
}
|
2020-02-25 11:53:57 -05:00
|
|
|
|
|
|
|
void Level::setMap(const Map &new_map)
|
|
|
|
{
|
|
|
|
map = std::move(new_map);
|
|
|
|
}
|