block_breaker/
dimensions.rs

1type Height = u16;
2type Width = u16;
3
4/// Generic dimensions
5#[derive(Clone)]
6pub struct Dimensions {
7    width: Width,
8    height: Height,
9}
10
11impl Dimensions {
12    /// Create a new set of dimensions
13    pub fn new(width: Width, height: Height) -> Dimensions {
14        Dimensions { width, height }
15    }
16
17    /// Get the width
18    pub fn width(&self) -> Width {
19        self.width
20    }
21
22    /// Get the height
23    pub fn height(&self) -> Height {
24        self.height
25    }
26}