mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-26 21:47:23 +01:00
Use embedded net when UCI option EvalFile has empty value
This commit is contained in:
parent
16d09453b9
commit
2fd84a648c
|
@ -165,7 +165,8 @@ public class InternalStockFish extends ExternalEngine {
|
||||||
* pointing to the network file embedded in DroidFish. */
|
* pointing to the network file embedded in DroidFish. */
|
||||||
@Override
|
@Override
|
||||||
public boolean setOption(String name, String value) {
|
public boolean setOption(String name, String value) {
|
||||||
if (name.toLowerCase(Locale.US).equals(netOption) && defaultNet.equals(value)) {
|
if (name.toLowerCase(Locale.US).equals(netOption) &&
|
||||||
|
(defaultNet.equals(value) || value.isEmpty())) {
|
||||||
getUCIOptions().getOption(name).setFromString(value);
|
getUCIOptions().getOption(name).setFromString(value);
|
||||||
value = defaultNetFile.getAbsolutePath();
|
value = defaultNetFile.getAbsolutePath();
|
||||||
writeLineToEngine(String.format(Locale.US, "setoption name %s value %s", name, value));
|
writeLineToEngine(String.format(Locale.US, "setoption name %s value %s", name, value));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user