Skip to content

SRS support #3

@ratijas

Description

@ratijas

textris/src/tetromino.rs

Lines 42 to 47 in 284603b

Tetromino::I => match dir {
Up => [Coord(0, -2), Coord(0, -1), Coord(0, 0), Coord(0, 1)],
Right => [Coord(-1, 0), Coord(0, 0), Coord(1, 0), Coord(2, 0)],
Down => [Coord(0, -1), Coord(0, 0), Coord(0, 1), Coord(0, 2)],
Left => [Coord(1, 0), Coord(0, 0), Coord(-1, 0), Coord(-2, 0)],
},

So, basically, there are just hard coded rotation values for single rotation position. No SRS support. No wall-kicks.

fn move_tetro(&mut self, dir: Dir) -> Result<(), ()> {

fn move_tetro(&mut self, dir: Dir) -> Result<(), ()> {

AFAIK, there are no such stuff as 'tetro'. There are minos: little single squares; and tetrominos (or tetriminos): O, I, J, L, S, Z, T shapes consisting of four minos.

RTFM @ http://harddrop.com/wiki/Tetris_Wiki for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions