Skip to content

Commit f6cbd1a

Browse files
committed
Bump version number, update binaries, minor fixes
1 parent 11e0e7b commit f6cbd1a

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

Stockfish/SFMUCIEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@property (nonatomic) SFMChessGame *gameToAnalyze;
3232
@property (nonatomic) NSUInteger multipv;
3333

34-
@property (readonly, nonatomic) NSDictionary /* <NSNumber, SFMUCILine> */ *latestLine; // TODO rename
34+
@property (readonly, nonatomic) NSDictionary /* <NSNumber, SFMUCILine> */ *lines;
3535

3636
- (instancetype)initStockfish;
3737
- (instancetype)initOptionsProbe;

Stockfish/SFMUCIEngine.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ @interface SFMUCIEngine()
3030

3131
@property (nonatomic) NSURL *bookmarkUrl;
3232

33-
@property (readwrite, nonatomic) NSDictionary /* <NSNumber, SFMUCILine> */ *latestLine;
33+
@property (readwrite, nonatomic) NSDictionary /* <NSNumber, SFMUCILine> */ *lines;
3434
@property (nonatomic) NSMutableArray /* of SFMUCIOption */ *options;
3535

3636
@property dispatch_group_t analysisGroup;
@@ -46,7 +46,7 @@ @implementation SFMUCIEngine
4646
- (void)setIsAnalyzing:(BOOL)isAnalyzing {
4747
if (_isAnalyzing != isAnalyzing) {
4848
_isAnalyzing = isAnalyzing;
49-
self.latestLine = nil;
49+
self.lines = nil;
5050

5151
if (isAnalyzing) {
5252
NSAssert(self.gameToAnalyze != nil, @"Trying to analyze but no game set");
@@ -149,10 +149,10 @@ - (void)processEngineOutput:(NSString *)str
149149
depth:[depth integerValue]];
150150
} else if ([tokens containsObject:@"depth"] && [tokens containsObject:@"pv"]) {
151151
// New line
152-
NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:self.latestLine];
152+
NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:self.lines];
153153
SFMUCILine *line = [[SFMUCILine alloc] initWithTokens:tokens position:self.gameToAnalyze.position];
154154
newDict[@(line.variationNum)] = line;
155-
self.latestLine = newDict;
155+
self.lines = newDict;
156156
[self.delegate uciEngine:self didGetNewLine:newDict];
157157
} else if ([tokens containsObject:@"bestmove"]) {
158158
// Stopped analysis
@@ -311,7 +311,6 @@ - (void)applyPreferencesToEngine:(NSNotification *)notification
311311
NSString *absoluteString = self.bookmarkUrl.absoluteString;
312312
NSString *stripped = [absoluteString stringByReplacingOccurrencesOfString:@"file://" withString:@""];
313313
[self setUciOption:@"SyzygyPath" stringValue:stripped];
314-
NSLog(@"Syzygy path set");
315314
}
316315
}
317316
}

Stockfish/SFMWindowController.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ - (IBAction)toggleInfiniteAnalysis:(id)sender {
106106
- (IBAction)doBestMove:(id)sender
107107
{
108108
if (self.engine.isAnalyzing) {
109-
[self doMoveWithOverwritePrompt:[((SFMUCILine *)self.engine.latestLine[@(1)]).moves firstObject]];
109+
[self doMoveWithOverwritePrompt:[((SFMUCILine *)self.engine.lines[@(1)]).moves firstObject]];
110110
}
111111
}
112112
- (IBAction)increaseVariations:(id)sender {
@@ -214,6 +214,8 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
214214
return ![self.currentGame atBeginning];
215215
} else if ([menuItem action] == @selector(lastMove:) || [menuItem action] == @selector(nextMove:)) {
216216
return ![self.currentGame atEnd];
217+
} else if ([menuItem action] == @selector(decreaseVariations:)) {
218+
return self.engine.multipv != 1;
217219
}
218220
return YES;
219221
}
@@ -228,7 +230,7 @@ - (void)uciEngine:(SFMUCIEngine *)engine didGetEngineName:(NSString *)name {
228230
- (void)uciEngine:(SFMUCIEngine *)engine didGetNewCurrentMove:(SFMMove *)move number:(NSInteger)moveNumber depth:(NSInteger)depth {
229231

230232
NSMutableArray /* of NSString */ *statusComponents = [[NSMutableArray alloc] init];
231-
SFMUCILine *pv = engine.latestLine[@(1)];
233+
SFMUCILine *pv = engine.lines[@(1)];
232234

233235
// 1. Score
234236
[statusComponents addObject:[SFMFormatter scoreAsText:(int) pv.score isMate:pv.scoreIsMateDistance isWhiteToMove:engine.gameToAnalyze.position.sideToMove == WHITE isLowerBound:pv.scoreIsLowerBound isUpperBound:pv.scoreIsUpperBound]];

Stockfish/Stockfish-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<key>CFBundlePackageType</key>
4343
<string>APPL</string>
4444
<key>CFBundleShortVersionString</key>
45-
<string>1.1</string>
45+
<string>2.0</string>
4646
<key>CFBundleSignature</key>
4747
<string>????</string>
4848
<key>CFBundleVersion</key>

Stockfish/stockfish-64

2.75 KB
Binary file not shown.

Stockfish/stockfish-bmi2

-3.22 KB
Binary file not shown.

Stockfish/stockfish-sse42

2.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)