File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -39,21 +39,14 @@ public enum EngineType: Int {
39
39
var setupCommands : [ EngineCommand ] {
40
40
switch self {
41
41
case . stockfish:
42
- let evalFiles = [ " nn-baff1ede1f90 " , " nn-b1a57edbea57 " ]
43
- . map {
44
- Bundle . main. url ( forResource: $0, withExtension: " nnue " ) ?
45
- . absoluteString
46
- . replacingOccurrences ( of: " file:// " , with: " " )
47
- }
48
-
49
- if let smallFileURL = evalFiles [ 0 ] , let bigFileURL = evalFiles [ 1 ] {
50
- return [
51
- . setoption( id: " EvalFile " , value: bigFileURL) ,
52
- . setoption( id: " EvalFileSmall " , value: smallFileURL)
53
- ]
54
- } else {
55
- return [ ]
42
+ let options = [
43
+ " EvalFile " : " nn-b1a57edbea57 " ,
44
+ " EvalFileSmall " : " nn-baff1ede1f90 "
45
+ ] . mapValues {
46
+ Bundle . main. url ( forResource: $0, withExtension: " nnue " ) ? . path ( )
56
47
}
48
+
49
+ return options. map ( EngineCommand . setoption)
57
50
case . lc0:
58
51
return [ ]
59
52
}
You can’t perform that action at this time.
0 commit comments