Browse Source

some notes

ag-yep
Taylor Bockman 7 years ago
parent
commit
bae58bb10f
  1. 12
      README.md
  2. 4
      src/lib.rs

12
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 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. 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.

4
src/lib.rs

@ -34,6 +34,10 @@ pub struct Engine<'a, R, W> {
impl<'a> 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> { 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 { Engine {
name: name, name: name,
author: author, author: author,

Loading…
Cancel
Save