Add readme and license.

This commit is contained in:
2023-08-27 15:47:06 -04:00
parent 1f33cb37d2
commit 367cda9e27
2 changed files with 52 additions and 0 deletions

27
readme.md Normal file
View File

@@ -0,0 +1,27 @@
The fantastic game *The Talos Principle* has these two dimensional Tetris like
puzzles that I find annoying to solve. This program can solve them for me.
First, specify the field size and puzzle pieces:
```rust
fn main() {
let field = Field::new(5, 5);
let pieces = vec![
// Piece::cleveland_z(), // -_
// Piece::rhode_island_z(), // _-
// Piece::teewee(),
// Piece::hero(),
// Piece::orange_ricky(), // ___|
// Piece::blue_ricky(), // |___
// Piece::smashboy(),
];
let result = solve(field, pieces);
match result {
Some(field) => println!("{}", field),
None => println!("No solution",)
};
}
```
Then, get the solution with `cargo run --release`.