# ruchess
a rust chess library
## at a glance
```sh
cargo add ruchess
```
or in your `cargo.toml`
```toml
[dependencies]
ruchess = "0.0.1"
```
### usage
```rust
use ruchess::game::Game;
use ruchess::square;
// Play 1.e4 from the standard starting position.
let game = Game::new();
let after_e4 = game.mve(square::E2, square::E4).unwrap();
assert!(after_e4.position().board().is_occupied(square::E4));
```
## module map
- [`bitboard`] — 64-bit board representation and bitwise operations.
- [`square`], [`rank`], [`file`] — coordinate primitives.
- [`color`], [`role`], [`piece`], [`side`] — piece and side identifiers.
- [`board`] — piece placement, attack detection, and queries.
- [`attacks`], [`magic`] — precomputed attack tables and magic bitboards.
- [`mve`], [`uci`] — move representation and UCI parsing.
- [`castles`], [`unmoved_rooks`] — castling rights and rook tracking.
- [`halfmoveclock`], [`ply`] — clocks for the fifty-move rule and side to move.
- [`hash`] — Zobrist hashing and repetition trails.
- [`history`] — per-position history (last move, castles, clock, hashes).
- [`position`] — a complete game state with legal-move generation.
- [`outcome`] — terminal results (win, draw, draw reason).
- [`game`] — high-level wrapper that tracks turns and outcomes.
## dependencies
- [lazy_static](https://docs.rs/lazy_static/latest/lazy_static/)
## roadmap
- [ ] benchmarks
- will move to mutable api if benchmarks are very bad
- [ ] fen parsing
- [ ] real uci support