https://github.com/thethirdone/fen4
A parser and writer for the fen4 file format used by Chess.com for 4 player chess games
https://github.com/thethirdone/fen4
Last synced: about 1 year ago
JSON representation
A parser and writer for the fen4 file format used by Chess.com for 4 player chess games
- Host: GitHub
- URL: https://github.com/thethirdone/fen4
- Owner: TheThirdOne
- License: mit
- Created: 2020-10-10T17:20:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-16T15:55:06.000Z (about 5 years ago)
- Last Synced: 2025-02-28T06:18:44.243Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
fen4
====
A Rust library to parse and write fen4 file formats.
This provides a mapping from a simple representation of a 4 player chess board
and the fen4 file format used by
[Chess.com](https://www.chess.com/4-player-chess). Any non-trivial computation
is likely to have a separate data format, but this generates useful error messages
and correctly handles almost every variation of 4 player chess (including tons of
non-standard pieces).
### Usage
Cargo.toml
```
[dependencies]
fen4 = "0.7"
```
```rust
fn main(){
let empty_fen = "R-0,0,0,0-0,0,0,0-0,0,0,0-0,0,0,0-0-14/14/14/14/14/14/14/14/14/14/14/14/14/14";
let board : Result = empty_fen.parse();
println!("{}",board.unwrap());
}
```
### Rust version requirements
fen4 requires rustc version 1.45 or greater. This is for `str.strip_prefix`;
working arount this requirement would move support needed back to around 1.32.