diff --git a/README.md b/README.md index 75ea8f2..455d565 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,15 @@ Yeah, probably. I have noticed that there are no good _free_ solutions so that anyone can build a chess engine. Since UCI is a common format, and something all engines (should) implement, making this chunk of it free makes _total_ sense. + +## Usage + +UCI is designed to complement your chess engine rather than be a one-stop shop for engine development. + +As such, you will be responsible for maintaining the game loop. What UCI provides is a series of functions +that will help you send data to, and receive data from the GUI. + +### First Steps + +Your engine will first need to wait on STDIN for a command `uci` from the GUI. This indicates that your engine should +switch to UCI mode. You can use `commands::UCI` to make sure the command text you are waiting for is correct. diff --git a/src/lib.rs b/src/lib.rs index 44b302c..7ac9282 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,6 +34,10 @@ pub struct Engine<'a, R, W> { impl<'a> Engine<'a, R, W> { pub fn new(name: &'a str, author: &'a str, reader: R, writer: W) -> Engine<'a> { + + // TODO: This should also take an EngineOptions thing that indicates which options are supported + // so that when called it can send them easily. + Engine { name: name, author: author,