diff options
author | curly <curlybryce@protonmail.com> | 2022-08-13 17:21:42 -0600 |
---|---|---|
committer | curly <curlybryce@protonmail.com> | 2022-08-13 17:21:42 -0600 |
commit | 1d1ca2fdae780efdb9d27394f5d3720fe9282c91 (patch) | |
tree | ce6c36767bba6e594d5ea63834041232f058a3ce /src/tetris.rs | |
download | tetris-1d1ca2fdae780efdb9d27394f5d3720fe9282c91.tar.gz tetris-1d1ca2fdae780efdb9d27394f5d3720fe9282c91.tar.bz2 tetris-1d1ca2fdae780efdb9d27394f5d3720fe9282c91.zip |
define everthing I can think of
Diffstat (limited to 'src/tetris.rs')
-rw-r--r-- | src/tetris.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tetris.rs b/src/tetris.rs new file mode 100644 index 0000000..9f9cda8 --- /dev/null +++ b/src/tetris.rs @@ -0,0 +1,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() {} +}
\ No newline at end of file |