mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-08 07:11:32 +01:00
Fix some Android Studio warnings.
This commit is contained in:
@@ -127,7 +127,7 @@ public class ChessBoardPainter extends JLabel {
|
||||
}
|
||||
}
|
||||
|
||||
private final void drawPiece(Graphics2D g, int xCrd, int yCrd, int p) {
|
||||
private void drawPiece(Graphics2D g, int xCrd, int yCrd, int p) {
|
||||
g.setColor(Piece.isWhite(p) ? Color.WHITE : Color.BLACK);
|
||||
String ps;
|
||||
switch (p) {
|
||||
@@ -195,10 +195,10 @@ public class ChessBoardPainter extends JLabel {
|
||||
}
|
||||
}
|
||||
|
||||
private final int getXCrd(int x) {
|
||||
private int getXCrd(int x) {
|
||||
return x0 + sqSize * (flipped ? 7 - x : x);
|
||||
}
|
||||
private final int getYCrd(int y) {
|
||||
private int getYCrd(int y) {
|
||||
return y0 + sqSize * (flipped ? y : (7 - y));
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ public class EngineControl {
|
||||
engineThread.start();
|
||||
}
|
||||
|
||||
private final void stopThread() {
|
||||
private void stopThread() {
|
||||
Thread myThread;
|
||||
Search mySearch;
|
||||
synchronized (threadMutex) {
|
||||
@@ -295,13 +295,13 @@ public class EngineControl {
|
||||
}
|
||||
|
||||
|
||||
private final void setupTT() {
|
||||
private void setupTT() {
|
||||
int nEntries = hashSizeMB > 0 ? hashSizeMB * (1 << 20) / 24 : 1024;
|
||||
int logSize = (int) Math.floor(Math.log(nEntries) / Math.log(2));
|
||||
tt = new TranspositionTable(logSize);
|
||||
}
|
||||
|
||||
private final void setupPosition(Position pos, List<Move> moves) {
|
||||
private void setupPosition(Position pos, List<Move> moves) {
|
||||
UndoInfo ui = new UndoInfo();
|
||||
posHashList = new long[200 + moves.size()];
|
||||
posHashListSize = 0;
|
||||
@@ -315,7 +315,7 @@ public class EngineControl {
|
||||
/**
|
||||
* Try to find a move to ponder from the transposition table.
|
||||
*/
|
||||
private final Move getPonderMove(Position pos, Move m) {
|
||||
private Move getPonderMove(Position pos, Move m) {
|
||||
if (m == null) return null;
|
||||
Move ret = null;
|
||||
UndoInfo ui = new UndoInfo();
|
||||
|
||||
@@ -37,6 +37,6 @@ public class SearchParams {
|
||||
boolean infinite;
|
||||
|
||||
public SearchParams() {
|
||||
searchMoves = new ArrayList<Move>();
|
||||
searchMoves = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class UCIProtocol {
|
||||
|
||||
public UCIProtocol() {
|
||||
pos = null;
|
||||
moves = new ArrayList<Move>();
|
||||
moves = new ArrayList<>();
|
||||
quit = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user