Skip to content

tetraliane/tetrice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tetrice

This library provides the core functions of Tetris.

How to use

  1. Install this crate.
  2. Make a block kind selector.
    use tetrice::BlockKind;
    
    fn selector() -> BlockKind {
        // Return one of the kinds (probably you want to select randomly)
    }
  3. Create a game.
    use tetrice::Game;
    
    fn main() {
        // Create a game which has a 10x20 field and provides 3 next tetriminos
        let mut game = Game::new(10, 20, 3, Box::new(selector));
        // Now you can move, rotate, etc. using `game`!
    }

Documentation

See docs.rs.

About

Provides core functions of Tetris.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages