diff --git a/tetros/src/tetrisboard/falling.rs b/tetros/src/tetrisboard/falling.rs index 1e9b96a..58e5ffb 100644 --- a/tetros/src/tetrisboard/falling.rs +++ b/tetros/src/tetrisboard/falling.rs @@ -141,31 +141,31 @@ impl FallingTetromino { // Straight // (Tetromino::Straight, Direction::North) => [ - (self.center_x - 2, self.center_y - 1), - (self.center_x - 1, self.center_y - 1), (self.center_x, self.center_y - 1), - (self.center_x + 1, self.center_y - 1), + (self.center_x, self.center_y), + (self.center_x, self.center_y + 1), + (self.center_x, self.center_y + 2), ], (Tetromino::Straight, Direction::East) => [ - (self.center_x + 1, self.center_y - 2), - (self.center_x + 1, self.center_y - 1), + (self.center_x - 1, self.center_y), + (self.center_x, self.center_y), (self.center_x + 1, self.center_y), - (self.center_x + 1, self.center_y + 1), + (self.center_x + 2, self.center_y), ], (Tetromino::Straight, Direction::South) => [ - (self.center_x - 2, self.center_y + 1), - (self.center_x - 1, self.center_y + 1), - (self.center_x, self.center_y + 1), + (self.center_x + 1, self.center_y - 1), + (self.center_x + 1, self.center_y), (self.center_x + 1, self.center_y + 1), + (self.center_x + 1, self.center_y + 2), ], (Tetromino::Straight, Direction::West) => [ - (self.center_x - 1, self.center_y - 2), - (self.center_x - 1, self.center_y - 1), - (self.center_x - 1, self.center_y), (self.center_x - 1, self.center_y + 1), + (self.center_x, self.center_y + 1), + (self.center_x + 1, self.center_y + 1), + (self.center_x + 2, self.center_y + 1), ], // @@ -234,31 +234,31 @@ impl FallingTetromino { // Left Skew // (Tetromino::SkewLeft, Direction::North) => [ - (self.center_x - 1, self.center_y), - (self.center_x, self.center_y), + (self.center_x - 1, self.center_y + 1), (self.center_x, self.center_y + 1), - (self.center_x + 1, self.center_y + 1), + (self.center_x, self.center_y), + (self.center_x + 1, self.center_y), ], (Tetromino::SkewLeft, Direction::East) => [ - (self.center_x, self.center_y - 1), - (self.center_x, self.center_y), + (self.center_x - 1, self.center_y - 1), (self.center_x - 1, self.center_y), - (self.center_x - 1, self.center_y + 1), + (self.center_x, self.center_y), + (self.center_x, self.center_y + 1), ], (Tetromino::SkewLeft, Direction::South) => [ - (self.center_x - 1, self.center_y - 1), - (self.center_x, self.center_y - 1), + (self.center_x - 1, self.center_y), (self.center_x, self.center_y), - (self.center_x + 1, self.center_y), + (self.center_x, self.center_y - 1), + (self.center_x + 1, self.center_y - 1), ], (Tetromino::SkewLeft, Direction::West) => [ - (self.center_x + 1, self.center_y - 1), - (self.center_x + 1, self.center_y), + (self.center_x, self.center_y - 1), (self.center_x, self.center_y), - (self.center_x, self.center_y + 1), + (self.center_x + 1, self.center_y), + (self.center_x + 1, self.center_y + 1), ], // @@ -267,27 +267,27 @@ impl FallingTetromino { (Tetromino::SkewRight, Direction::North) => [ (self.center_x - 1, self.center_y), (self.center_x, self.center_y), - (self.center_x, self.center_y - 1), - (self.center_x + 1, self.center_y - 1), + (self.center_x, self.center_y + 1), + (self.center_x + 1, self.center_y + 1), ], (Tetromino::SkewRight, Direction::East) => [ - (self.center_x, self.center_y + 1), + (self.center_x, self.center_y - 1), (self.center_x, self.center_y), - (self.center_x + 1, self.center_y), - (self.center_x + 1, self.center_y - 1), + (self.center_x - 1, self.center_y), + (self.center_x - 1, self.center_y + 1), ], (Tetromino::SkewRight, Direction::South) => [ - (self.center_x - 1, self.center_y + 1), - (self.center_x, self.center_y + 1), + (self.center_x - 1, self.center_y - 1), + (self.center_x, self.center_y - 1), (self.center_x, self.center_y), (self.center_x + 1, self.center_y), ], (Tetromino::SkewRight, Direction::West) => [ - (self.center_x - 1, self.center_y - 1), - (self.center_x - 1, self.center_y), + (self.center_x + 1, self.center_y - 1), + (self.center_x + 1, self.center_y), (self.center_x, self.center_y), (self.center_x, self.center_y + 1), ],