From 3eca0caaa4ede8d3944e2e3d5bb7c2baa03e2237 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Tue, 12 Dec 2017 16:29:22 -0800 Subject: [PATCH] yep --- README.md | 11 +++++++++++ src/lib.rs | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index d3d3fbc..7b39224 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,19 @@ Notice how in our STDIN thread we are calling `Engine::parse` and the handling t depending on what kind of token it was. You are responsible for obeying the commands from this thread, the UCI library just makes it convenient to work with. +At this point the engine will send a series of `setoption` commands to you in your STDIN thread. We can use the +`Engine::parse` function to get these: + +``` +EXAMPLE HERE +``` + +Once the options are extracted you will be responsible for configuring your engine with the values. The GUI will send +an `isready` command which you will be responsible for replying to by using `Engine::ready`. + **TODO: MORE STUFF WITH EXAMPLES** **THINGS LIKE SENDINB BEST MOVE AFTER CALCULATING, ETC** +**RECEIVING SETOPTION COMMANDS AND PROCESSING THEM** ### Other Options diff --git a/src/lib.rs b/src/lib.rs index 860ae16..7489c06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,4 +76,8 @@ where // Again this command must complete before we can say the engine is connected, so panicking at this stage is ok write!(&mut self.writer, "{}", commands::UCIOK).expect("failed to send `uciok` command"); } + + pub fn ready(&mut self) { + // TODO: TESTS TO MAKE SURE IT SENDS READYOK + } }