Skip to content

Commit 822bc2a

Browse files
chore: update readme to remove no compilable examples and update instalation instruction (#11)
1 parent 32e8d05 commit 822bc2a

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,12 @@ Add this to your `Cargo.toml`:
1616

1717
```toml
1818
[dependencies]
19-
grid_engine = "0.1.0"
19+
grid_engine = {version = "*"}
2020
```
2121

2222
## Usage
2323

24-
Here's a basic example of using grid_engine:
25-
26-
```rust
27-
use grid_engine::grid_engine::GridEngine;
28-
29-
// Create a new 10x12 grid
30-
let mut grid = GridEngine::new(10, 12);
31-
32-
// Add a change listener to track modifications
33-
grid.events.add_changes_listener(Box::new(|event| {
34-
println!("Grid changed: {:?}", event.changes);
35-
}));
36-
37-
// Add items to the grid (with automatic collision handling)
38-
grid.add_item("box1".to_string(), 0, 0, 2, 2).unwrap();
39-
grid.add_item("box2".to_string(), 0, 0, 2, 2).unwrap(); // Will be repositioned to avoid collision
40-
41-
// Move items
42-
grid.move_item("box1", 2, 2).unwrap();
43-
44-
// Remove items
45-
grid.remove_item("box2").unwrap();
46-
```
47-
48-
Check out the [examples](examples/) directory for more usage examples.
24+
Check out the [examples](examples/) directory for usage examples.
4925

5026
## API Overview
5127

0 commit comments

Comments
 (0)