puzzlesolver: Final fields

This commit is contained in:
sdburns1998
2019-07-07 17:57:02 +02:00
parent 622fe2e06e
commit adbe421838
4 changed files with 7 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ public class PuzzleSolverPlugin extends Plugin
private PuzzleSolverConfig config;
private LightboxState lightbox;
private LightboxState[] changes = new LightboxState[LightBox.COMBINATIONS_POWER];
private final LightboxState[] changes = new LightboxState[LightBox.COMBINATIONS_POWER];
private Combination lastClick;
private boolean lastClickInvalid;

View File

@@ -37,8 +37,8 @@ public class PuzzleSolver implements Runnable
private static final Duration MAX_WAIT_DURATION = Duration.ofMillis(1500);
private Pathfinder pathfinder;
private PuzzleState startState;
private final Pathfinder pathfinder;
private final PuzzleState startState;
private List<PuzzleState> solution;
private int position;

View File

@@ -51,9 +51,9 @@ import net.runelite.client.plugins.puzzlesolver.solver.heuristics.Heuristic;
public class IDAStarMM extends IDAStar
{
private PuzzleState currentState;
private List<PuzzleState> stateList = new ArrayList<>();
private List<List<Integer>> validRowNumbers = new ArrayList<>();
private List<List<Integer>> validColumnNumbers = new ArrayList<>();
private final List<PuzzleState> stateList = new ArrayList<>();
private final List<List<Integer>> validRowNumbers = new ArrayList<>();
private final List<List<Integer>> validColumnNumbers = new ArrayList<>();
public IDAStarMM(Heuristic heuristic)
{

View File

@@ -31,7 +31,7 @@ import net.runelite.client.plugins.puzzlesolver.solver.heuristics.Heuristic;
public abstract class Pathfinder
{
private Heuristic heuristic;
private final Heuristic heuristic;
Pathfinder(Heuristic heuristic)
{