https://github.com/lainq/fen-rs
A simple and goofy library used to convert(and verify?) Forsyth-Edwards Notation in chess to board and vice-versa
https://github.com/lainq/fen-rs
c chess fen forsyth-edwards-notation
Last synced: about 2 months ago
JSON representation
A simple and goofy library used to convert(and verify?) Forsyth-Edwards Notation in chess to board and vice-versa
- Host: GitHub
- URL: https://github.com/lainq/fen-rs
- Owner: lainq
- License: mit
- Created: 2023-07-25T12:08:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T19:14:31.000Z (over 2 years ago)
- Last Synced: 2025-03-05T07:43:16.875Z (over 1 year ago)
- Topics: c, chess, fen, forsyth-edwards-notation
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fenrs
A simple library used to parse Forsyth-Edwards Notation in chess.
```rs
use fenrs::Fen;
fn main() {
let notation = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
let fen_obj = Fen::parse(¬ation);
let back_to_notation = fen_obj.to_string();
}
```
## Documentation
The library only exposes a handful of structs and functions.
The usage is documented below
```rs
impl Fen {
// ...
fn parse>(notation: T) -> Result;
}
impl ToString for Fen {
fn to_string(&self) -> String;
}
```