pub struct Border {
pub border: String,
pub h: u16,
pub w: u16,
pub x: u16,
pub y: u16,
}
impl Border {
pub fn new(h: u16, w: u16, x: u16, y: u16, border: String) -> Border {
Border {
border, h,
w,
x,
y,
}
}
pub fn draw(&self) {
for row in 0..self.h {
println!("{:width$}", "", width = self.x as usize);
let border_line = self.border.repeat(self.w as usize);
println!("{}", border_line);
}
}
}