mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
Small cleanup
This commit is contained in:
parent
7c75c83859
commit
795428992f
|
@ -170,15 +170,12 @@ public class DroidEngineControl {
|
|||
/**
|
||||
* Compute thinking time for current search.
|
||||
*/
|
||||
final public void computeTimeLimit(SearchParams sPar) {
|
||||
private void computeTimeLimit(SearchParams sPar) {
|
||||
minTimeLimit = -1;
|
||||
maxTimeLimit = -1;
|
||||
maxDepth = -1;
|
||||
maxNodes = -1;
|
||||
if (sPar.infinite) {
|
||||
minTimeLimit = -1;
|
||||
maxTimeLimit = -1;
|
||||
maxDepth = -1;
|
||||
} else if (sPar.depth > 0) {
|
||||
maxDepth = sPar.depth;
|
||||
} else if (sPar.mate > 0) {
|
||||
|
@ -212,13 +209,7 @@ public class DroidEngineControl {
|
|||
}
|
||||
|
||||
private static int clamp(int val, int min, int max) {
|
||||
if (val < min) {
|
||||
return min;
|
||||
} else if (val > max) {
|
||||
return max;
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
return Math.min(Math.max(val, min), max);
|
||||
}
|
||||
|
||||
private void startThread(final int minTimeLimit, final int maxTimeLimit,
|
||||
|
@ -277,7 +268,7 @@ public class DroidEngineControl {
|
|||
engineThread.start();
|
||||
}
|
||||
|
||||
final public void stopThread() {
|
||||
private void stopThread() {
|
||||
Thread myThread;
|
||||
Search mySearch;
|
||||
synchronized (threadMutex) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public abstract class ChessBoard extends View {
|
|||
public boolean highlightLastMove; // If true, last move is marked with a rectangle
|
||||
public boolean blindMode; // If true, no chess pieces and arrows are drawn
|
||||
|
||||
List<Move> moveHints;
|
||||
private List<Move> moveHints;
|
||||
|
||||
/** Decoration for a square. Currently the only possible decoration is a tablebase probe result. */
|
||||
public final static class SquareDecoration implements Comparable<SquareDecoration> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user