Skip to content
/ fen-rs Public

A simple and goofy library used to convert(and verify?) Forsyth-Edwards Notation in chess to board and vice-versa

License

Notifications You must be signed in to change notification settings

lainq/fen-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fenrs

A simple library used to parse Forsyth-Edwards Notation in chess.

use fenrs::Fen;

fn main() {
  let notation = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
  let fen_obj = Fen::parse(&notation);
  let back_to_notation = fen_obj.to_string();
}

Documentation

The library only exposes a handful of structs and functions. The usage is documented below

impl Fen {
  // ...
  fn parse<T: AsRef<str>>(notation: T) -> Result<Fen, FenParsingError>;
}

impl ToString for Fen {
  fn to_string(&self) -> String;
}

About

A simple and goofy library used to convert(and verify?) Forsyth-Edwards Notation in chess to board and vice-versa

Topics

Resources

License

Stars

Watchers

Forks

Languages