mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
Minor cleanup
This commit is contained in:
parent
219c07e769
commit
7d87d1fbd4
|
@ -54,7 +54,7 @@ public class ColorTheme {
|
|||
public final static int GENERAL_BACKGROUND = 18;
|
||||
private final static int numColors = 19;
|
||||
|
||||
private int colorTable[] = new int[numColors];
|
||||
private int[] colorTable = new int[numColors];
|
||||
|
||||
private static final String[] prefNames = {
|
||||
"darkSquare", "brightSquare", "selectedSquare", "darkPiece", "brightPiece", "currentMove",
|
||||
|
@ -73,7 +73,7 @@ public class ColorTheme {
|
|||
R.string.colortheme_scid_brown,
|
||||
R.string.colortheme_scid_green
|
||||
};
|
||||
private final static String themeColors[][] = {
|
||||
private final static String[][] themeColors = {
|
||||
{ // Original
|
||||
"#FF808080", "#FFBEBE5A", "#FFFF0000", "#FF000000", "#FFFFFFFF", "#FF888888",
|
||||
"#A01F1FFF", "#A0FF1F1F", "#501F1FFF", "#50FF1F1F", "#371F1FFF", "#3CFF1F1F", "#1E1F1FFF", "#28FF1F1F",
|
||||
|
|
|
@ -294,7 +294,7 @@ public abstract class ChessBoard extends View {
|
|||
/**
|
||||
* Set the board to a given state.
|
||||
*/
|
||||
final public void setPosition(Position pos) {
|
||||
public final void setPosition(Position pos) {
|
||||
boolean doInvalidate = false;
|
||||
if (anim.paused) {
|
||||
anim.paused = false;
|
||||
|
@ -326,7 +326,7 @@ public abstract class ChessBoard extends View {
|
|||
}
|
||||
|
||||
/** Set drag state. Return true if any changes were made. */
|
||||
private final boolean setDragStateInternal(int sq, int xCrd, int yCrd) {
|
||||
private boolean setDragStateInternal(int sq, int xCrd, int yCrd) {
|
||||
boolean modified = false;
|
||||
if (!isValidDragSquare(sq)) {
|
||||
if (dragSquare != -1) {
|
||||
|
@ -347,7 +347,7 @@ public abstract class ChessBoard extends View {
|
|||
}
|
||||
|
||||
/** Set/clear the board flipped status. */
|
||||
final public void setFlipped(boolean flipped) {
|
||||
public final void setFlipped(boolean flipped) {
|
||||
if (this.flipped != flipped) {
|
||||
this.flipped = flipped;
|
||||
invalidate();
|
||||
|
@ -355,7 +355,7 @@ public abstract class ChessBoard extends View {
|
|||
}
|
||||
|
||||
/** Set/clear the drawSquareLabels status. */
|
||||
final public void setDrawSquareLabels(boolean drawSquareLabels) {
|
||||
public final void setDrawSquareLabels(boolean drawSquareLabels) {
|
||||
if (this.drawSquareLabels != drawSquareLabels) {
|
||||
this.drawSquareLabels = drawSquareLabels;
|
||||
invalidate();
|
||||
|
@ -363,7 +363,7 @@ public abstract class ChessBoard extends View {
|
|||
}
|
||||
|
||||
/** Set/clear the board blindMode status. */
|
||||
final public void setBlindMode(boolean blindMode) {
|
||||
public final void setBlindMode(boolean blindMode) {
|
||||
if (this.blindMode != blindMode) {
|
||||
this.blindMode = blindMode;
|
||||
invalidate();
|
||||
|
@ -374,7 +374,7 @@ public abstract class ChessBoard extends View {
|
|||
* Set/clear the selected square.
|
||||
* @param square The square to select, or -1 to clear selection.
|
||||
*/
|
||||
final public void setSelection(int square) {
|
||||
public final void setSelection(int square) {
|
||||
if (square != selectedSquare) {
|
||||
selectedSquare = square;
|
||||
invalidate();
|
||||
|
@ -680,17 +680,17 @@ public abstract class ChessBoard extends View {
|
|||
switch (sd.tbData.type) {
|
||||
case DTM:
|
||||
if (wdl > 0)
|
||||
s = "+" + String.valueOf(num);
|
||||
s = "+" + num;
|
||||
else if (wdl < 0)
|
||||
s = "-" + String.valueOf(num);
|
||||
s = "-" + num;
|
||||
else
|
||||
s = "0";
|
||||
break;
|
||||
case DTZ:
|
||||
if (wdl > 0)
|
||||
s = "W" + String.valueOf(num);
|
||||
s = "W" + num;
|
||||
else if (wdl < 0)
|
||||
s = "L" + String.valueOf(num);
|
||||
s = "L" + num;
|
||||
else
|
||||
s = "0";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user