Crates.io | tetrice |
lib.rs | tetrice |
version | 0.1.0 |
source | src |
created_at | 2023-01-21 15:07:07.934232 |
updated_at | 2023-01-21 15:07:07.934232 |
description | Provides the core functions of Tetris |
homepage | |
repository | https://github.com/tetraliane/tetris-core |
max_upload_size | |
id | 764371 |
size | 45,002 |
This library provides the core functions of Tetris.
use tetrice::BlockKind;
fn selector() -> BlockKind {
// Return one of the kinds (probably you want to select randomly)
}
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`!
}
cargo doc --package tetris