Made all variables and parameter final where available

This commit is contained in:
Niklas Birk
2019-04-02 20:34:15 +02:00
parent 4a0b04aefe
commit d4e54493c7
13 changed files with 95 additions and 117 deletions

View File

@ -10,21 +10,21 @@ class DepthFirstSearchTest
@Test
void shouldReturnCorrectTarget()
{
int[][] state = {
final int[][] state = {
{1, 2, 3},
{4, 5, 6},
{7, 0, 8}
};
var root = new EightPuzzleNode(state);
final var root = new EightPuzzleNode(state);
int[][] targetState = {
final int[][] targetState = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 0}
};
var expected = new EightPuzzleNode(targetState);
final var expected = new EightPuzzleNode(targetState);
var actual = new DepthFirstSearch().depthFirstSearch(root, expected);
final var actual = new DepthFirstSearch().depthFirstSearch(root, expected);
printSolution(actual);
}