sort() and sort_multipv() are almost the same, so
use only one implementation.
Also introduce the natural RootMove::operator<() to
compare the moves instead of compare_root_moves(),
this will allow to use std::sort instead of our
home grown bubble-sort.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Moves are already sorted, so just consider the best
and the second one.
Some trailing whitespace remove noise crept in due
to my editor removes it before to save.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
After testing and comparing output with standard Glaurung
a couple of issues arised.
A default value was wrong and init_uci_options() missed a couple
of stringify() calls. Also storing bool values as "false" and "true"
needs some care.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Instead of old-style C string functions use standard
library to greatly streamline the implementation.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Class UCIInputParser is now a typedef of a std::istringstream,
this greatly simplifies the code, especially the many conversions
from string to integer are now handled automatically by the
stream instead of relying on a chunk of C-style atoi() calls.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>