gorrosion_gtp/command/regression.rs
1//! Standard commands for regression testing.
2
3use super::*;
4
5/// (Unimplemented) Load an SGF file.
6///
7/// Given a file name load the game status from the file.
8/// If the optional move number is specified,
9/// only consider the file up to the specified move.
10///
11/// Since the spec never mentioned optional arguments up until now,
12/// there is no abstraction in place to deal with them.
13/// (Don't we all love a spec that leaves out no chance to contradict itself?
14/// As far as I understand the matter, there is literally no way
15/// to implement this command and follow the rest of the spec at the same time.)
16///
17/// # Effects
18/// > Board size and komi are set to the values given in the sgf file.
19/// > Board configuration, number of captured stones, and move history
20/// > are found by replaying the game record
21/// > up to the position before move number or until the end if omitted.
22///
23/// # Fails
24/// * Syntax error
25///
26pub fn loadsgf() -> Command {
27 unimplemented!()
28}
29
30/// Decide predictably on a move to play.
31///
32/// This command is the similar to `genmove`
33/// but intended for use in (regression) testing.
34///
35/// # Comments
36/// > This command differs from `genmove`
37/// > in that it does not play the generated move.
38/// > It is also advisable to turn off any move randomization
39/// > since that may cause meaningless regression fluctuations.
40pub fn reg_genmove() -> Command {
41 command!("reg_genmove" => (color) -> (vertex|string))
42}