diff --git a/CuckooChessApp/src/main/java/org/petero/cuckoochess/CuckooChess.java b/CuckooChessApp/src/main/java/org/petero/cuckoochess/CuckooChess.java index fa26cb6..679abe1 100644 --- a/CuckooChessApp/src/main/java/org/petero/cuckoochess/CuckooChess.java +++ b/CuckooChessApp/src/main/java/org/petero/cuckoochess/CuckooChess.java @@ -21,11 +21,9 @@ package org.petero.cuckoochess; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; -import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; -import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.graphics.Typeface; import android.os.Bundle; import android.preference.PreferenceManager; @@ -33,9 +31,6 @@ import android.text.ClipboardManager; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; -import android.view.View; -import android.view.View.OnLongClickListener; -import android.view.View.OnTouchListener; import android.widget.ScrollView; import android.widget.Toast; diff --git a/DroidFishApp/src/androidTest/java/org/petero/droidfish/book/EcoTest.java b/DroidFishApp/src/androidTest/java/org/petero/droidfish/book/EcoTest.java index 960b19c..82f3630 100644 --- a/DroidFishApp/src/androidTest/java/org/petero/droidfish/book/EcoTest.java +++ b/DroidFishApp/src/androidTest/java/org/petero/droidfish/book/EcoTest.java @@ -18,18 +18,16 @@ package org.petero.droidfish.book; +import androidx.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; import org.petero.droidfish.PGNOptions; import org.petero.droidfish.gamelogic.Game; import org.petero.droidfish.gamelogic.GameTree; import org.petero.droidfish.gamelogic.TimeControlData; -import androidx.test.InstrumentationRegistry; -import androidx.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; /** Test of EcoDb class. */ @RunWith(AndroidJUnit4.class) diff --git a/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java b/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java index bf752c3..d0ece21 100644 --- a/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java +++ b/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java @@ -13,16 +13,15 @@ */ package com.kalab.chess.enginesupport; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; - import android.content.ContentResolver; import android.net.Uri; import android.util.Log; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + public class ChessEngine { private static final String TAG = ChessEngine.class.getSimpleName(); diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/ButtonActions.java b/DroidFishApp/src/main/java/org/petero/droidfish/ButtonActions.java index 8241639..b5082b1 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/ButtonActions.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/ButtonActions.java @@ -18,15 +18,13 @@ package org.petero.droidfish; -import java.util.ArrayList; - import android.app.Activity; import android.content.SharedPreferences; import android.view.View; -import android.view.View.OnClickListener; -import android.view.View.OnLongClickListener; import android.widget.ImageButton; +import java.util.ArrayList; + /** * Handle all actions connected to a button. */ diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/Speech.java b/DroidFishApp/src/main/java/org/petero/droidfish/Speech.java index 91a9223..12c4ad6 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/Speech.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/Speech.java @@ -18,17 +18,16 @@ package org.petero.droidfish; -import java.util.Locale; +import android.content.Context; +import android.speech.tts.TextToSpeech; +import android.widget.Toast; import org.petero.droidfish.gamelogic.Move; import org.petero.droidfish.gamelogic.Piece; import org.petero.droidfish.gamelogic.Position; import org.petero.droidfish.gamelogic.TextIO; -import android.content.Context; -import android.speech.tts.TextToSpeech; -import android.speech.tts.TextToSpeech.OnInitListener; -import android.widget.Toast; +import java.util.Locale; /** Handles text to speech translation. */ public class Speech { diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/activities/FENFile.java b/DroidFishApp/src/main/java/org/petero/droidfish/activities/FENFile.java index 96c8220..f86b1a9 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/activities/FENFile.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/activities/FENFile.java @@ -18,13 +18,12 @@ package org.petero.droidfish.activities; +import android.util.Pair; + import java.io.File; import java.io.IOException; import java.util.ArrayList; -import android.app.Activity; -import android.util.Pair; - public class FENFile { private final File fileName; diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/book/PolyglotBook.java b/DroidFishApp/src/main/java/org/petero/droidfish/book/PolyglotBook.java index b8c321c..9e801ef 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/book/PolyglotBook.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/book/PolyglotBook.java @@ -18,17 +18,16 @@ package org.petero.droidfish.book; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.ArrayList; - import org.petero.droidfish.book.DroidBook.BookEntry; import org.petero.droidfish.gamelogic.Move; import org.petero.droidfish.gamelogic.Piece; import org.petero.droidfish.gamelogic.Position; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.ArrayList; + class PolyglotBook implements IOpeningBook { private File bookFile; diff --git a/DroidFishApp/src/main/java/tourguide/tourguide/Sequence.java b/DroidFishApp/src/main/java/tourguide/tourguide/Sequence.java index ae92547..c228adc 100644 --- a/DroidFishApp/src/main/java/tourguide/tourguide/Sequence.java +++ b/DroidFishApp/src/main/java/tourguide/tourguide/Sequence.java @@ -1,7 +1,5 @@ package tourguide.tourguide; -import android.view.View; - /** * Created by aaronliew on 8/7/15. */ @@ -204,4 +202,4 @@ public class Sequence { } } } -} \ No newline at end of file +} diff --git a/buildSrc/src/main/java/chess/Book.java b/buildSrc/src/main/java/chess/Book.java index d2444e5..f01d49b 100644 --- a/buildSrc/src/main/java/chess/Book.java +++ b/buildSrc/src/main/java/chess/Book.java @@ -25,12 +25,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.LineNumberReader; -import java.security.SecureRandom; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import java.util.Random; /** Implements an opening book. */ public class Book { diff --git a/buildSrc/src/main/java/chess/FileUtil.java b/buildSrc/src/main/java/chess/FileUtil.java index 92d123a..7280d27 100644 --- a/buildSrc/src/main/java/chess/FileUtil.java +++ b/buildSrc/src/main/java/chess/FileUtil.java @@ -20,13 +20,9 @@ package chess; import java.io.BufferedReader; import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.RandomAccessFile; -import java.io.UnsupportedEncodingException; import java.util.ArrayList; public class FileUtil { diff --git a/buildSrc/src/main/java/chess/GameTree.java b/buildSrc/src/main/java/chess/GameTree.java index 66822ff..15b4286 100644 --- a/buildSrc/src/main/java/chess/GameTree.java +++ b/buildSrc/src/main/java/chess/GameTree.java @@ -18,14 +18,10 @@ package chess; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.Map.Entry; public class GameTree { // Data from the seven tag roster (STR) part of the PGN standard diff --git a/buildSrc/src/main/java/chess/Move.java b/buildSrc/src/main/java/chess/Move.java index 055770e..75d1e2b 100644 --- a/buildSrc/src/main/java/chess/Move.java +++ b/buildSrc/src/main/java/chess/Move.java @@ -18,8 +18,6 @@ package chess; -import java.util.Comparator; - public class Move { /** From square, 0-63. */ public int from;