| Crates.io | fen4 |
| lib.rs | fen4 |
| version | 0.7.0 |
| created_at | 2020-10-10 17:46:46.031865+00 |
| updated_at | 2021-05-16 15:23:33.653596+00 |
| description | A parser and writer for the fen4 file format used by Chess.com for 4 player chess games |
| homepage | |
| repository | https://github.com/TheThirdOne/fen4/ |
| max_upload_size | |
| id | 298088 |
| size | 46,322 |
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. 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).
Cargo.toml
[dependencies]
fen4 = "0.7"
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<fen4::Board,fen4::BoardParseError> = empty_fen.parse();
println!("{}",board.unwrap());
}
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.