aboutsummaryrefslogtreecommitdiff
path: root/src/tetris.rs
blob: 9f9cda898cf8d0246b065a8dc590d301186eb52e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
mod piece;

use piece::Piece;

#[derive(Debug)]
pub struct Tetris {
    grid: Vec<Vec<i8>>
}
impl Tetris {
    pub fn new() -> Tetris {
        Tetris{
            grid: vec!(vec!(0; 10); 20),
        }
    }

    // Return the grid
    pub fn return_grid(&self) -> &Vec<Vec<i8>> {
        &self.grid
    }

    // Set the grid, given a piece
    pub fn set_grid(&mut self, piece: Piece) {}

    // Check each row of the grid
    // If one is full, remove it and drop
    // the rest of the grid down
    pub fn check_lines() {}
}