mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-19 04:02:23 +01:00
DroidFish: Made UCI_LimitStrength and UCI_Elo options visible.
This commit is contained in:
@@ -23,6 +23,7 @@ import java.io.FileInputStream;
|
|||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -139,11 +140,14 @@ public abstract class UCIEngineBase implements UCIEngine {
|
|||||||
/** Return true if the UCI option can be changed by the user. */
|
/** Return true if the UCI option can be changed by the user. */
|
||||||
protected boolean configurableOption(String name) {
|
protected boolean configurableOption(String name) {
|
||||||
name = name.toLowerCase(Locale.US);
|
name = name.toLowerCase(Locale.US);
|
||||||
if (name.startsWith("uci_") || name.equals("hash") || name.equals("ponder") ||
|
if (name.startsWith("uci_")) {
|
||||||
name.equals("multipv") || name.equals("gaviotatbpath") ||
|
String[] allowed = { "uci_limitstrength", "uci_elo" };
|
||||||
name.equals("syzygypath"))
|
return Arrays.asList(allowed).contains(name);
|
||||||
return false;
|
} else {
|
||||||
return true;
|
String[] ignored = { "hash", "ponder", "multipv",
|
||||||
|
"gaviotatbpath", "syzygypath" };
|
||||||
|
return !Arrays.asList(ignored).contains(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user