From 7d87d1fbd4d6cd5ff46e75b6a2875829f1e50576 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Mon, 1 Jun 2020 21:59:32 +0200 Subject: [PATCH] Minor cleanup --- .../java/org/petero/droidfish/ColorTheme.java | 4 ++-- .../org/petero/droidfish/view/ChessBoard.java | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/ColorTheme.java b/DroidFishApp/src/main/java/org/petero/droidfish/ColorTheme.java index b4c9846..bd46d6d 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/ColorTheme.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/ColorTheme.java @@ -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", diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/view/ChessBoard.java b/DroidFishApp/src/main/java/org/petero/droidfish/view/ChessBoard.java index 8f88d94..6b5b2e3 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/view/ChessBoard.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/view/ChessBoard.java @@ -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;