#include "level.h" Level::Level() { // Fill the level with water for (Row &row : map) { for (char &cell : row) cell = '.'; } // Temporary mock // Ground map[1][2] = '-'; map[1][3] = '-'; map[1][4] = '-'; map[2][2] = '-'; map[3][2] = '-'; map[3][3] = '-'; // Charge map[2][3] = '$'; } void Level::placeBridge(Row::size_type x, Row::size_type y) { map[x][y] = static_cast(177); } bool Level::isWater(Row::size_type x, Row::size_type y) const { return (map[x][y] == '.'); } void Level::removeCharge(Row::size_type x, Row::size_type y) { map[x][y] = '-'; }