1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* SPDX-FileCopyrightText: Copyright: 2024-2026 Contributors to shakmaty-uci <https://gitlab.com/Arcaik/shakmaty-uci>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
//! A library to parse and write Universal Chess Interface (UCI) message.
//!
//! # Examples
//!
//! Ask the engine to evaluate a position:
//!
//! ```
//! use shakmaty_uci::UciMessage;
//!
//! println!("{}", UciMessage::Uci); // uci
//! assert_eq!("uciok".parse(), Ok(UciMessage::UciOk));
//! println!(
//! "{}",
//! UciMessage::Position{
//! startpos: true,
//! fen: None,
//! moves: vec![
//! "e2e4".parse().unwrap(),
//! "e7e5".parse().unwrap(),
//! "g8f3".parse().unwrap(),
//! ],
//! }
//! );
//! println!("{}", UciMessage::go_infinite())
//! ```
//!
extern crate alloc;
extern crate std;
pub use ;
pub use *;