use grid::Grid;
const EXPECT_COORD_INTO_USIZE: &str = "expected map coordinate to be convertible to usize";
pub struct GenericMap<T>(Grid<T>);
impl<T> GenericMap<T> {
pub fn from_initial_value(width: impl TryInto<usize>, height: impl TryInto<usize>, initial_value: T) -> Self {
Self(
Grid::init(
height.try_into().ok().expect(EXPECT_COORD_INTO_USIZE), width.try_into().ok().expect(EXPECT_COORD_INTO_USIZE),
initial_value
)
)
}
}