pub fn draw_rectangle(
        &mut self,
        start_position: Position,
        dimensions: Position,
        color_code: Color,
    ) {
        (start_position.x..(start_position.x + dimensions.x)).for_each(|x| {
            (start_position.y..(start_position.y + dimensions.y))
                .for_each(|y| self.draw(Position::new(x, y), color_code))
        })
    }
// TODO: ensure dimensions are within the 2d bounds of the buffer
ensure dimensions are within the 2d bounds of the buffer
ensure dimensions are within the 2d bounds of the buffer
pub fn draw_rectangle(
        &mut self,
        start_position: Position,
        dimensions: Position,
        color_code: Color,
    ) {
        (start_position.x..(start_position.x + dimensions.x)).for_each(|x| {
            (start_position.y..(start_position.y + dimensions.y))
                .for_each(|y| self.draw(Position::new(x, y), color_code))
        })
    }
pub fn draw_rectangle ( & mut self , start_position : Position , dimensions : Position , color_code : Color , ) { ( start_position . x .. ( start_position . x + dimensions . x ) ) . for_each ( | x | { ( start_position . y .. ( start_position . y + dimensions . y ) ) . for_each ( | y | self . draw ( Position :: new ( x , y ) , color_code ) ) } ) }
TODO: ensure dimensions are within the 2d bounds of the buffer
TODO : ensure dimensions are within the 2d bounds of the buffer
&mut self
start_position
Position
dimensions
Position
color_code
Color
&mut self
start_position
Position
dimensions
Position
color_code
Color