Add readme and license.
This commit is contained in:
27
readme.md
Normal file
27
readme.md
Normal 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`.
|
||||
Reference in New Issue
Block a user