project: 🧹🧹

This commit is contained in:
Owain van Brakel
2019-11-23 21:23:14 +01:00
parent d6e730e53c
commit 2362cccfdf
557 changed files with 2643 additions and 3098 deletions

View File

@@ -27,7 +27,6 @@ package net.runelite.client.config;
import com.google.inject.Guice;
import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import java.io.IOException;
import java.time.Instant;
import java.util.UUID;
import java.util.concurrent.ScheduledExecutorService;
@@ -70,7 +69,7 @@ public class ConfigManagerTest
}
@Test
public void testGetConfig() throws IOException
public void testGetConfig()
{
AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now());
accountSession.setUsername("test");
@@ -82,7 +81,7 @@ public class ConfigManagerTest
}
@Test
public void testGetConfigDefault() throws IOException
public void testGetConfigDefault()
{
AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now());
accountSession.setUsername("test");
@@ -92,7 +91,7 @@ public class ConfigManagerTest
}
@Test
public void testSetConfig() throws IOException
public void testSetConfig()
{
AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now());
accountSession.setUsername("test");
@@ -104,7 +103,7 @@ public class ConfigManagerTest
}
@Test
public void testGetConfigDescriptor() throws IOException
public void testGetConfigDescriptor()
{
AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now());
accountSession.setUsername("test");

View File

@@ -345,8 +345,6 @@ public class ItemVariationMappingTest
ItemVariationMapping.load();
ITEMS_MAP.forEach((key, value) ->
{
assertEquals(value, (Integer) ItemVariationMapping.map(key));
});
assertEquals(value, (Integer) ItemVariationMapping.map(key)));
}
}

View File

@@ -209,6 +209,7 @@ public class PluginManagerTest
class TestPlugin extends Plugin
{
private boolean thisShouldBeTrue = false;
@Subscribe
private void doSomething(TestEvent event)
{

View File

@@ -33,12 +33,12 @@ import net.runelite.api.Client;
import net.runelite.api.Skill;
import net.runelite.api.VarPlayer;
import net.runelite.api.Varbits;
import net.runelite.api.events.WidgetHiddenChanged;
import net.runelite.client.events.ConfigChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetHiddenChanged;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.OpenOSRSConfig;
import net.runelite.client.events.ConfigChanged;
import net.runelite.client.ui.overlay.OverlayManager;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

View File

@@ -37,6 +37,8 @@ import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.GameStateChanged;
import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.config.OpenOSRSConfig;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -45,8 +47,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.mockito.junit.MockitoJUnitRunner;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@RunWith(MockitoJUnitRunner.class)
public class EmojiPluginTest

View File

@@ -50,13 +50,11 @@ public class TemplateTest
{
Function<String, String> func = (String resource) ->
{
switch (resource)
if ("file2".equals(resource))
{
case "file2":
return FILE2;
default:
throw new RuntimeException("unknown resource");
return FILE2;
}
throw new RuntimeException("unknown resource");
};
String out = new Template(func).process(FILE1);
assertEquals(RESULT, out);

View File

@@ -104,13 +104,13 @@ public class IdleNotifierPluginTest
Guice.createInjector(BoundFieldModule.of(this)).injectMembers(this);
// Mock monster
final String[] monsterActions = new String[] { "Attack", "Examine" };
final String[] monsterActions = new String[]{"Attack", "Examine"};
final NPCDefinition monsterComp = mock(NPCDefinition.class);
when(monsterComp.getActions()).thenReturn(monsterActions);
when(monster.getDefinition()).thenReturn(monsterComp);
// Mock random event
final String[] randomEventActions = new String[] { "Talk-to", "Dismiss", "Examine" };
final String[] randomEventActions = new String[]{"Talk-to", "Dismiss", "Examine"};
final NPCDefinition randomEventComp = mock(NPCDefinition.class);
when(randomEventComp.getActions()).thenReturn(randomEventActions);
when(randomEvent.getDefinition()).thenReturn(randomEventComp);

View File

@@ -39,7 +39,7 @@ import static org.mockito.Mockito.when;
public enum MagicMaxHitConfig implements MaxHitConfig
{
TRIDENT_SLAYER(new int[] {75, 83, 99}, 0, new Item[]
TRIDENT_SLAYER(new int[]{75, 83, 99}, 0, new Item[]
{
mockItem(ItemID.SLAYER_HELMET_I),
mockItem(ItemID.SARADOMIN_CAPE),
@@ -53,9 +53,9 @@ public enum MagicMaxHitConfig implements MaxHitConfig
mockItem(ItemID.MYSTIC_GLOVES),
mockItem(ItemID.WIZARD_BOOTS),
mockItem(ItemID.RING_OF_WEALTH)
}, new int[] {25, 27, 34}),
}, new int[]{25, 27, 34}),
TRIDENT_OF_SEAS(new int[] {75, 83, 99}, 0, new Item[]
TRIDENT_OF_SEAS(new int[]{75, 83, 99}, 0, new Item[]
{
mockItem(ItemID.MYSTIC_HAT),
mockItem(ItemID.SARADOMIN_CAPE),
@@ -69,9 +69,9 @@ public enum MagicMaxHitConfig implements MaxHitConfig
mockItem(ItemID.MYSTIC_GLOVES),
mockItem(ItemID.WIZARD_BOOTS),
mockItem(ItemID.RING_OF_WEALTH)
}, new int[] {20, 22, 28}),
}, new int[]{20, 22, 28}),
TRIDENT_OF_SWAMP(new int[] {75, 83, 99}, 0, new Item[]
TRIDENT_OF_SWAMP(new int[]{75, 83, 99}, 0, new Item[]
{
mockItem(ItemID.MYSTIC_HAT),
mockItem(ItemID.SARADOMIN_CAPE),
@@ -85,9 +85,9 @@ public enum MagicMaxHitConfig implements MaxHitConfig
mockItem(ItemID.MYSTIC_GLOVES),
mockItem(ItemID.WIZARD_BOOTS),
mockItem(ItemID.RING_OF_WEALTH)
}, new int[] {23, 25, 31}),
}, new int[]{23, 25, 31}),
MAGIC_DART(new int[] {75, 83, 99}, 18, new Item[]
MAGIC_DART(new int[]{75, 83, 99}, 18, new Item[]
{
mockItem(ItemID.MYSTIC_HAT),
mockItem(ItemID.SARADOMIN_CAPE),
@@ -101,7 +101,7 @@ public enum MagicMaxHitConfig implements MaxHitConfig
mockItem(ItemID.MYSTIC_GLOVES),
mockItem(ItemID.WIZARD_BOOTS),
mockItem(ItemID.RING_OF_WEALTH)
}, new int[] {17, 18, 19}),
}, new int[]{17, 18, 19}),
FIRE_BOLT(75, 8, new Item[]
@@ -197,10 +197,10 @@ public enum MagicMaxHitConfig implements MaxHitConfig
MagicMaxHitConfig(int magicLevel, int spellId, Item[] equipedItems, int expectedMaxHit)
{
this.magicLevels = new int[] {magicLevel};
this.magicLevels = new int[]{magicLevel};
this.spellId = spellId;
this.equipedItems = equipedItems;
this.expectedMaxHits = new int[] {expectedMaxHit};
this.expectedMaxHits = new int[]{expectedMaxHit};
}
MagicMaxHitConfig(int[] magicLevels, int spellId, Item[] equipedItems, int[] expectedMaxHits)

View File

@@ -43,7 +43,7 @@ import static org.mockito.Mockito.when;
public enum MeleeMaxHitConfig implements MaxHitConfig
{
DRAGON_SCIMITAR(new int[] {75, 83, 99}, 66, WeaponType.TYPE_9, 1, new Item[]
DRAGON_SCIMITAR(new int[]{75, 83, 99}, 66, WeaponType.TYPE_9, 1, new Item[]
{
mockItem(ItemID.IRON_FULL_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -57,9 +57,9 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {17, 19, 22}),
}, new int[]{17, 19, 22}),
DRAGON_SCIMITAR_DEFENDER(new int[] {75, 83, 99}, 76, WeaponType.TYPE_9, 1, new Item[]
DRAGON_SCIMITAR_DEFENDER(new int[]{75, 83, 99}, 76, WeaponType.TYPE_9, 1, new Item[]
{
mockItem(ItemID.IRON_FULL_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -73,9 +73,9 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {19, 21, 24}),
}, new int[]{19, 21, 24}),
DRAGON_SCIMITAR_COMPLETE(new int[] {75, 83, 99}, 108, WeaponType.TYPE_9, 1, new Item[]
DRAGON_SCIMITAR_COMPLETE(new int[]{75, 83, 99}, 108, WeaponType.TYPE_9, 1, new Item[]
{
mockItem(ItemID.SLAYER_HELMET),
mockItem(ItemID.FIRE_CAPE),
@@ -89,9 +89,9 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.BARROWS_GLOVES),
mockItem(ItemID.DRAGON_BOOTS),
mockItem(ItemID.BERSERKER_RING)
}, new int[] {26, 29, 35}),
}, new int[]{26, 29, 35}),
OBSIDIAN_SET(new int[] {75, 83, 99}, 61, WeaponType.TYPE_17, 2, new Item[]
OBSIDIAN_SET(new int[]{75, 83, 99}, 61, WeaponType.TYPE_17, 2, new Item[]
{
mockItem(ItemID.OBSIDIAN_HELMET),
mockItem(ItemID.OBSIDIAN_CAPE),
@@ -105,10 +105,10 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {18, 19, 23}),
}, new int[]{18, 19, 23}),
DHAROK_SET(new int[] {75, 75, 75, 83, 83, 83, 99, 99, 99}, 105, WeaponType.TYPE_1, 1,
new int[][] {{99, 99}, {1, 99}, {32, 75}, {99, 99}, {1, 99}, {32, 75}, {99, 99}, {1, 99}, {32, 75}},
DHAROK_SET(new int[]{75, 75, 75, 83, 83, 83, 99, 99, 99}, 105, WeaponType.TYPE_1, 1,
new int[][]{{99, 99}, {1, 99}, {32, 75}, {99, 99}, {1, 99}, {32, 75}, {99, 99}, {1, 99}, {32, 75}},
new Item[]
{
mockItem(ItemID.DHAROKS_HELM_100),
@@ -123,9 +123,9 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {23, 45, 30, 25, 49, 33, 29, 57, 38}),
}, new int[]{23, 45, 30, 25, 49, 33, 29, 57, 38}),
VOID_SET(new int[] {75, 83, 99}, 66, WeaponType.TYPE_9, 1, new Item[]
VOID_SET(new int[]{75, 83, 99}, 66, WeaponType.TYPE_9, 1, new Item[]
{
mockItem(ItemID.VOID_MELEE_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -139,7 +139,7 @@ public enum MeleeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.VOID_KNIGHT_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {19, 21, 25}),
}, new int[]{19, 21, 25}),
;

View File

@@ -43,7 +43,7 @@ import static org.mockito.Mockito.when;
public enum RangeMaxHitConfig implements MaxHitConfig
{
MAGIC_SHORTBOW(new int[] {75, 83, 99}, 49, WeaponType.TYPE_3, 1, new Item[]
MAGIC_SHORTBOW(new int[]{75, 83, 99}, 49, WeaponType.TYPE_3, 1, new Item[]
{
mockItem(ItemID.IRON_FULL_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -58,9 +58,9 @@ public enum RangeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING),
mockItem(ItemID.RUNE_ARROW)
}, new int[] {15, 16, 19}),
}, new int[]{15, 16, 19}),
RUNE_CROSSBOW(new int[] {75, 83, 99}, 115, WeaponType.TYPE_5, 0, new Item[]
RUNE_CROSSBOW(new int[]{75, 83, 99}, 115, WeaponType.TYPE_5, 0, new Item[]
{
mockItem(ItemID.IRON_FULL_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -75,9 +75,9 @@ public enum RangeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING),
mockItem(ItemID.RUNITE_BOLTS)
}, new int[] {24, 26, 31}),
}, new int[]{24, 26, 31}),
BLOwPIPE(new int[] {75, 83, 99}, 50, WeaponType.TYPE_19, 1, new Item[]
BLOwPIPE(new int[]{75, 83, 99}, 50, WeaponType.TYPE_19, 1, new Item[]
{
mockItem(ItemID.IRON_FULL_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -91,9 +91,9 @@ public enum RangeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.LEATHER_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {15, 16, 19}),
}, new int[]{15, 16, 19}),
VOID_SET(new int[] {75, 83, 99}, 115, WeaponType.TYPE_5, 1, new Item[]
VOID_SET(new int[]{75, 83, 99}, 115, WeaponType.TYPE_5, 1, new Item[]
{
mockItem(ItemID.VOID_RANGER_HELM),
mockItem(ItemID.BLACK_CAPE),
@@ -107,7 +107,7 @@ public enum RangeMaxHitConfig implements MaxHitConfig
mockItem(ItemID.VOID_KNIGHT_GLOVES),
mockItem(ItemID.LEATHER_BOOTS),
mockItem(ItemID.GOLD_RING)
}, new int[] {26, 28, 33}),
}, new int[]{26, 28, 33}),
;

View File

@@ -30,109 +30,109 @@ import net.runelite.client.plugins.puzzlesolver.solver.PuzzleState;
import net.runelite.client.plugins.puzzlesolver.solver.heuristics.ManhattanDistance;
import net.runelite.client.plugins.puzzlesolver.solver.pathfinding.IDAStar;
import net.runelite.client.plugins.puzzlesolver.solver.pathfinding.IDAStarMM;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class PuzzleSolverTest
{
private static final PuzzleState[] START_STATES =
{
new PuzzleState(new int[]{0, 11, 1, 3, 4, 5, 12, 2, 7, 9, 6, 20, 18, 16, 8, 15, 22, 10, 14, 13, 21, -1, 17, 23, 19}),
new PuzzleState(new int[]{0, 2, 7, 3, 4, 10, 5, 12, 1, 9, 6, 17, 8, 14, 19, -1, 16, 21, 11, 13, 15, 20, 22, 18, 23}),
new PuzzleState(new int[]{0, 1, 11, 3, 4, 12, 2, 7, 13, 9, 5, 21, 15, 17, 14, -1, 10, 6, 8, 19, 16, 20, 22, 18, 23}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 10, 5, 6, 9, 14, 15, -1, 7, 13, 17, 21, 11, 20, 23, 8, 16, 22, 12, 19, 18}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 5, 6, 8, 22, 18, 10, -1, 7, 17, 9, 20, 11, 12, 21, 14, 16, 15, 23, 13, 19}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 5, 6, 8, 12, 9, 16, 11, 17, 7, 14, 10, 20, -1, 22, 13, 15, 18, 21, 23, 19}),
new PuzzleState(new int[]{1, 6, 16, 8, 4, 0, 7, 11, 2, 9, 5, 21, 18, 3, 14, 10, 20, -1, 13, 22, 15, 23, 12, 17, 19}),
new PuzzleState(new int[]{0, 1, 2, 4, 8, 6, 16, 11, 7, 3, 5, -1, 12, 14, 9, 15, 10, 17, 13, 18, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 2, 9, 14, 6, 5, 7, 11, 3, 4, 15, 10, 1, 12, 18, 16, 17, -1, 8, 13, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 11, 5, 12, 7, 8, 10, 6, 15, 13, 9, 16, 21, -1, 17, 14, 20, 22, 23, 18, 19}),
new PuzzleState(new int[]{5, 0, 1, 2, 4, 10, 6, 3, 8, 9, 12, 13, 7, 14, 19, 15, 11, 16, 17, -1, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 5, 8, -1, 2, 9, 16, 11, 12, 7, 14, 10, 15, 17, 13, 19, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 2, 4, 11, 15, 8, 3, 14, 5, 7, 9, 12, 18, 16, 10, 17, 23, 13, 20, 21, 22, -1, 19}),
new PuzzleState(new int[]{0, 1, 7, 2, 4, 5, 3, 12, 8, 9, 15, 6, 18, -1, 13, 11, 10, 22, 17, 23, 16, 21, 20, 19, 14}),
new PuzzleState(new int[]{0, 1, 2, 7, 3, 5, 11, 6, 14, 4, 10, -1, 16, 12, 9, 15, 17, 18, 8, 19, 20, 21, 13, 22, 23}),
new PuzzleState(new int[]{2, 10, 5, 3, 4, -1, 0, 1, 8, 9, 15, 11, 7, 13, 23, 17, 6, 20, 14, 19, 16, 12, 18, 21, 22}),
new PuzzleState(new int[]{0, 1, 2, 8, 9, 5, 6, 7, 3, 4, 10, -1, 14, 23, 18, 21, 11, 16, 12, 19, 15, 20, 17, 13, 22}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 11, 2, 13, 9, 12, 5, 16, 7, 18, 8, 20, 15, -1, 14, 19, 21, 10, 22, 23, 17}),
new PuzzleState(new int[]{12, 1, 2, 3, 4, 0, 7, 6, 8, 9, 5, 10, 22, 13, 19, 15, 11, 21, 14, 17, 20, 16, 18, -1, 23}),
new PuzzleState(new int[]{0, 2, 11, 3, 4, 5, 1, 6, 8, 9, 15, 10, 13, 14, 19, 7, 12, -1, 17, 18, 20, 21, 16, 22, 23}),
new PuzzleState(new int[]{5, 0, 4, 2, 9, 10, 7, 3, 19, 8, 6, 1, 18, -1, 14, 15, 11, 16, 12, 13, 20, 21, 17, 22, 23}),
new PuzzleState(new int[]{0, 3, 2, 7, 4, 6, 10, 1, 8, 9, 15, 5, 12, 18, 13, -1, 20, 11, 22, 14, 16, 21, 23, 17, 19}),
new PuzzleState(new int[]{1, 2, 4, -1, 9, 0, 5, 7, 3, 14, 10, 6, 8, 13, 19, 15, 11, 18, 12, 22, 20, 16, 21, 23, 17}),
new PuzzleState(new int[]{0, 1, 2, 4, 9, 5, 11, -1, 7, 14, 10, 17, 6, 13, 8, 15, 16, 20, 3, 18, 22, 21, 12, 23, 19}),
new PuzzleState(new int[]{0, 1, 8, 2, 4, 5, 11, 17, 3, 9, 6, 16, 7, 12, 18, 15, 21, -1, 14, 13, 20, 22, 10, 23, 19}),
new PuzzleState(new int[]{5, 0, 2, 3, 4, 1, 8, 6, 7, 9, 11, 12, 16, 13, 14, -1, 22, 20, 17, 19, 21, 10, 15, 18, 23}),
new PuzzleState(new int[]{0, -1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 16, 11, 13, 14, 10, 15, 19, 22, 23, 20, 21, 17, 12, 18}),
new PuzzleState(new int[]{0, 2, 7, -1, 4, 6, 1, 9, 3, 14, 5, 12, 8, 13, 19, 15, 16, 10, 22, 23, 20, 11, 18, 21, 17}),
new PuzzleState(new int[]{7, 5, 13, 1, 12, 0, 2, 4, 3, 9, 10, 6, 8, 17, 14, 15, 11, 16, 18, -1, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{5, 0, 3, 8, 4, 10, 6, -1, 7, 9, 11, 1, 12, 2, 19, 15, 16, 17, 14, 13, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{5, 2, 3, 7, 4, 0, 6, 14, 9, 19, 1, 11, 22, 17, 12, 10, 15, -1, 13, 8, 20, 16, 21, 18, 23}),
new PuzzleState(new int[]{0, 1, 3, 4, 9, 5, 6, 2, 7, 14, 10, 13, 17, -1, 8, 15, 11, 16, 12, 18, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 3, 11, 7, 4, 5, 2, 6, 12, 8, 10, 1, 17, -1, 9, 15, 16, 23, 13, 14, 20, 21, 18, 22, 19}),
new PuzzleState(new int[]{1, 5, 8, 2, 4, -1, 0, 7, 3, 9, 11, 22, 15, 12, 14, 6, 10, 18, 16, 19, 20, 21, 17, 13, 23}),
new PuzzleState(new int[]{7, 12, 11, 4, 9, -1, 0, 8, 10, 2, 6, 1, 16, 3, 14, 5, 15, 17, 13, 19, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{11, 3, 2, 12, 4, 6, 0, 7, 13, 8, 1, 5, 17, 16, 9, -1, 10, 15, 18, 14, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 5, 11, 2, 10, 9, 15, 12, 8, 14, 19, 16, 21, -1, 7, 13, 20, 22, 17, 18, 23}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 6, 10, 7, 8, 9, 5, 16, 11, 14, 17, 20, 13, 18, 12, 22, 21, 15, 23, -1, 19}),
new PuzzleState(new int[]{0, 1, 2, 4, 8, 5, 6, 7, 3, -1, 10, 16, 18, 17, 9, 15, 12, 11, 14, 13, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 11, 6, 1, 4, 5, 21, 8, 2, 9, 10, 3, 16, -1, 14, 15, 12, 17, 13, 19, 20, 22, 7, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 2, 4, 11, 10, 3, 13, 9, 5, 7, 8, -1, 23, 15, 16, 22, 18, 14, 20, 21, 12, 17, 19}),
new PuzzleState(new int[]{0, 6, 1, 2, 3, 10, 11, 12, 5, 18, 15, 7, 4, -1, 14, 21, 17, 13, 8, 9, 16, 20, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 3, 11, 4, 6, 10, 14, 2, 8, 5, -1, 12, 7, 9, 15, 16, 18, 13, 19, 20, 21, 22, 17, 23}),
new PuzzleState(new int[]{1, 5, 2, 3, 4, -1, 0, 7, 14, 8, 11, 6, 13, 9, 23, 10, 12, 15, 19, 17, 20, 21, 16, 22, 18}),
};
{
new PuzzleState(new int[]{0, 11, 1, 3, 4, 5, 12, 2, 7, 9, 6, 20, 18, 16, 8, 15, 22, 10, 14, 13, 21, -1, 17, 23, 19}),
new PuzzleState(new int[]{0, 2, 7, 3, 4, 10, 5, 12, 1, 9, 6, 17, 8, 14, 19, -1, 16, 21, 11, 13, 15, 20, 22, 18, 23}),
new PuzzleState(new int[]{0, 1, 11, 3, 4, 12, 2, 7, 13, 9, 5, 21, 15, 17, 14, -1, 10, 6, 8, 19, 16, 20, 22, 18, 23}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 10, 5, 6, 9, 14, 15, -1, 7, 13, 17, 21, 11, 20, 23, 8, 16, 22, 12, 19, 18}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 5, 6, 8, 22, 18, 10, -1, 7, 17, 9, 20, 11, 12, 21, 14, 16, 15, 23, 13, 19}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 5, 6, 8, 12, 9, 16, 11, 17, 7, 14, 10, 20, -1, 22, 13, 15, 18, 21, 23, 19}),
new PuzzleState(new int[]{1, 6, 16, 8, 4, 0, 7, 11, 2, 9, 5, 21, 18, 3, 14, 10, 20, -1, 13, 22, 15, 23, 12, 17, 19}),
new PuzzleState(new int[]{0, 1, 2, 4, 8, 6, 16, 11, 7, 3, 5, -1, 12, 14, 9, 15, 10, 17, 13, 18, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 2, 9, 14, 6, 5, 7, 11, 3, 4, 15, 10, 1, 12, 18, 16, 17, -1, 8, 13, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 11, 5, 12, 7, 8, 10, 6, 15, 13, 9, 16, 21, -1, 17, 14, 20, 22, 23, 18, 19}),
new PuzzleState(new int[]{5, 0, 1, 2, 4, 10, 6, 3, 8, 9, 12, 13, 7, 14, 19, 15, 11, 16, 17, -1, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 5, 8, -1, 2, 9, 16, 11, 12, 7, 14, 10, 15, 17, 13, 19, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 2, 4, 11, 15, 8, 3, 14, 5, 7, 9, 12, 18, 16, 10, 17, 23, 13, 20, 21, 22, -1, 19}),
new PuzzleState(new int[]{0, 1, 7, 2, 4, 5, 3, 12, 8, 9, 15, 6, 18, -1, 13, 11, 10, 22, 17, 23, 16, 21, 20, 19, 14}),
new PuzzleState(new int[]{0, 1, 2, 7, 3, 5, 11, 6, 14, 4, 10, -1, 16, 12, 9, 15, 17, 18, 8, 19, 20, 21, 13, 22, 23}),
new PuzzleState(new int[]{2, 10, 5, 3, 4, -1, 0, 1, 8, 9, 15, 11, 7, 13, 23, 17, 6, 20, 14, 19, 16, 12, 18, 21, 22}),
new PuzzleState(new int[]{0, 1, 2, 8, 9, 5, 6, 7, 3, 4, 10, -1, 14, 23, 18, 21, 11, 16, 12, 19, 15, 20, 17, 13, 22}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 11, 2, 13, 9, 12, 5, 16, 7, 18, 8, 20, 15, -1, 14, 19, 21, 10, 22, 23, 17}),
new PuzzleState(new int[]{12, 1, 2, 3, 4, 0, 7, 6, 8, 9, 5, 10, 22, 13, 19, 15, 11, 21, 14, 17, 20, 16, 18, -1, 23}),
new PuzzleState(new int[]{0, 2, 11, 3, 4, 5, 1, 6, 8, 9, 15, 10, 13, 14, 19, 7, 12, -1, 17, 18, 20, 21, 16, 22, 23}),
new PuzzleState(new int[]{5, 0, 4, 2, 9, 10, 7, 3, 19, 8, 6, 1, 18, -1, 14, 15, 11, 16, 12, 13, 20, 21, 17, 22, 23}),
new PuzzleState(new int[]{0, 3, 2, 7, 4, 6, 10, 1, 8, 9, 15, 5, 12, 18, 13, -1, 20, 11, 22, 14, 16, 21, 23, 17, 19}),
new PuzzleState(new int[]{1, 2, 4, -1, 9, 0, 5, 7, 3, 14, 10, 6, 8, 13, 19, 15, 11, 18, 12, 22, 20, 16, 21, 23, 17}),
new PuzzleState(new int[]{0, 1, 2, 4, 9, 5, 11, -1, 7, 14, 10, 17, 6, 13, 8, 15, 16, 20, 3, 18, 22, 21, 12, 23, 19}),
new PuzzleState(new int[]{0, 1, 8, 2, 4, 5, 11, 17, 3, 9, 6, 16, 7, 12, 18, 15, 21, -1, 14, 13, 20, 22, 10, 23, 19}),
new PuzzleState(new int[]{5, 0, 2, 3, 4, 1, 8, 6, 7, 9, 11, 12, 16, 13, 14, -1, 22, 20, 17, 19, 21, 10, 15, 18, 23}),
new PuzzleState(new int[]{0, -1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 16, 11, 13, 14, 10, 15, 19, 22, 23, 20, 21, 17, 12, 18}),
new PuzzleState(new int[]{0, 2, 7, -1, 4, 6, 1, 9, 3, 14, 5, 12, 8, 13, 19, 15, 16, 10, 22, 23, 20, 11, 18, 21, 17}),
new PuzzleState(new int[]{7, 5, 13, 1, 12, 0, 2, 4, 3, 9, 10, 6, 8, 17, 14, 15, 11, 16, 18, -1, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{5, 0, 3, 8, 4, 10, 6, -1, 7, 9, 11, 1, 12, 2, 19, 15, 16, 17, 14, 13, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{5, 2, 3, 7, 4, 0, 6, 14, 9, 19, 1, 11, 22, 17, 12, 10, 15, -1, 13, 8, 20, 16, 21, 18, 23}),
new PuzzleState(new int[]{0, 1, 3, 4, 9, 5, 6, 2, 7, 14, 10, 13, 17, -1, 8, 15, 11, 16, 12, 18, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 3, 11, 7, 4, 5, 2, 6, 12, 8, 10, 1, 17, -1, 9, 15, 16, 23, 13, 14, 20, 21, 18, 22, 19}),
new PuzzleState(new int[]{1, 5, 8, 2, 4, -1, 0, 7, 3, 9, 11, 22, 15, 12, 14, 6, 10, 18, 16, 19, 20, 21, 17, 13, 23}),
new PuzzleState(new int[]{7, 12, 11, 4, 9, -1, 0, 8, 10, 2, 6, 1, 16, 3, 14, 5, 15, 17, 13, 19, 20, 21, 22, 18, 23}),
new PuzzleState(new int[]{11, 3, 2, 12, 4, 6, 0, 7, 13, 8, 1, 5, 17, 16, 9, -1, 10, 15, 18, 14, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 6, 1, 3, 4, 5, 11, 2, 10, 9, 15, 12, 8, 14, 19, 16, 21, -1, 7, 13, 20, 22, 17, 18, 23}),
new PuzzleState(new int[]{0, 1, 2, 3, 4, 6, 10, 7, 8, 9, 5, 16, 11, 14, 17, 20, 13, 18, 12, 22, 21, 15, 23, -1, 19}),
new PuzzleState(new int[]{0, 1, 2, 4, 8, 5, 6, 7, 3, -1, 10, 16, 18, 17, 9, 15, 12, 11, 14, 13, 20, 21, 22, 23, 19}),
new PuzzleState(new int[]{0, 11, 6, 1, 4, 5, 21, 8, 2, 9, 10, 3, 16, -1, 14, 15, 12, 17, 13, 19, 20, 22, 7, 18, 23}),
new PuzzleState(new int[]{0, 6, 1, 2, 4, 11, 10, 3, 13, 9, 5, 7, 8, -1, 23, 15, 16, 22, 18, 14, 20, 21, 12, 17, 19}),
new PuzzleState(new int[]{0, 6, 1, 2, 3, 10, 11, 12, 5, 18, 15, 7, 4, -1, 14, 21, 17, 13, 8, 9, 16, 20, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 3, 11, 4, 6, 10, 14, 2, 8, 5, -1, 12, 7, 9, 15, 16, 18, 13, 19, 20, 21, 22, 17, 23}),
new PuzzleState(new int[]{1, 5, 2, 3, 4, -1, 0, 7, 14, 8, 11, 6, 13, 9, 23, 10, 12, 15, 19, 17, 20, 21, 16, 22, 18}),
};
private static final PuzzleState[] START_STATES_MM =
{
new PuzzleState(new int[]{0, 5, 1, 3, 4, 15, 2, 8, 10, 9, 22, 16, 11, 6, 14, 7, 21, 23, 12, 18, 20, -1, 17, 13, 19}),
new PuzzleState(new int[]{0, 12, 8, 13, 4, 3, 16, 2, 1, 9, 21, 5, 6, 10, 14, 7, 17, 20, 18, -1, 15, 11, 22, 23, 19}),
new PuzzleState(new int[]{1, 3, 7, 9, 8, 13, 17, 2, 4, 6, 15, 5, 22, 12, 14, 11, 0, 10, 21, -1, 20, 18, 16, 23, 19}),
new PuzzleState(new int[]{5, 2, 16, 14, 4, 3, 0, 8, 9, 11, 15, 6, 17, 19, 7, 1, 10, -1, 23, 18, 20, 12, 21, 13, 22}),
new PuzzleState(new int[]{0, 6, 1, 4, 13, 10, 2, 16, 7, 3, 20, -1, 8, 14, 9, 21, 5, 18, 11, 19, 17, 15, 12, 22, 23}),
new PuzzleState(new int[]{5, 0, 1, 4, 8, 10, 6, 7, 12, 3, 17, 16, 21, 2, 9, 18, 20, 13, 14, 19, 11, -1, 23, 15, 22}),
new PuzzleState(new int[]{1, 9, 2, 13, 17, 5, 7, 8, 3, 22, 6, -1, 16, 12, 4, 15, 18, 0, 23, 14, 10, 21, 11, 20, 19}),
new PuzzleState(new int[]{1, 2, 11, 13, 4, 21, 7, 3, 6, 9, 0, 8, 10, 19, 14, 20, 12, 16, 23, -1, 5, 17, 15, 22, 18}),
new PuzzleState(new int[]{2, 0, 1, 4, 13, 6, 7, 3, 8, 9, 22, 15, 10, 14, 18, 5, 12, -1, 17, 21, 20, 11, 23, 16, 19}),
new PuzzleState(new int[]{0, 1, 2, 8, 3, 6, 12, 22, 9, 7, 11, 21, 13, 4, 14, 5, 10, -1, 18, 19, 20, 15, 16, 23, 17}),
new PuzzleState(new int[]{1, 2, 3, 4, 8, 0, 6, 15, 14, 18, 16, 17, 20, -1, 9, 10, 12, 22, 11, 13, 21, 7, 5, 19, 23}),
new PuzzleState(new int[]{0, 5, 2, 4, 9, 7, 15, 20, 12, 13, 6, -1, 22, 1, 8, 10, 11, 23, 14, 3, 21, 16, 17, 19, 18}),
new PuzzleState(new int[]{0, 1, 9, 6, 13, 5, 18, -1, 4, 2, 15, 12, 3, 17, 7, 16, 10, 8, 23, 14, 20, 21, 19, 11, 22}),
new PuzzleState(new int[]{11, 5, 12, 3, 4, 15, 8, 0, 7, 1, 6, -1, 19, 2, 9, 16, 10, 13, 17, 23, 20, 21, 22, 14, 18}),
new PuzzleState(new int[]{10, 0, 1, 3, 4, 18, 5, 6, 12, 9, 7, 11, 8, -1, 22, 15, 23, 14, 19, 13, 20, 2, 17, 16, 21}),
new PuzzleState(new int[]{19, -1, 6, 2, 4, 0, 21, 10, 3, 9, 1, 15, 17, 8, 14, 11, 13, 22, 7, 18, 16, 12, 5, 23, 20}),
new PuzzleState(new int[]{11, 6, 3, 4, 9, 1, 10, 16, 2, 7, 5, 0, 13, -1, 12, 21, 8, 18, 17, 14, 15, 20, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 5, 3, 4, -1, 6, 2, 15, 10, 7, 8, 23, 16, 13, 22, 11, 9, 12, 14, 20, 21, 18, 17, 19}),
new PuzzleState(new int[]{10, 0, 1, -1, 2, 6, 5, 4, 13, 9, 16, 17, 12, 8, 19, 20, 15, 7, 21, 11, 22, 18, 14, 23, 3}),
new PuzzleState(new int[]{1, 0, 5, 3, 9, 20, 15, 7, 2, 14, 6, 4, 12, -1, 8, 13, 18, 10, 23, 11, 21, 16, 17, 19, 22}),
new PuzzleState(new int[]{0, 7, 6, 3, 4, 15, 1, 2, 8, 18, 11, 5, 13, -1, 22, 17, 16, 23, 14, 9, 20, 10, 12, 19, 21}),
new PuzzleState(new int[]{5, 7, 0, 2, 9, 10, 1, 11, 3, 4, 16, 22, 8, 14, 17, 15, 20, 12, 13, 6, 21, 23, 19, -1, 18}),
new PuzzleState(new int[]{3, 0, 1, 5, 4, 11, 6, 2, 16, 9, 15, 10, 7, 12, 13, 21, 19, -1, 22, 8, 20, 17, 14, 18, 23}),
new PuzzleState(new int[]{6, 0, 3, 2, 4, 5, 1, 8, 13, 12, 15, 14, 10, 7, 9, -1, 22, 11, 19, 23, 16, 20, 17, 21, 18}),
new PuzzleState(new int[]{11, 5, 6, 8, 9, 0, 21, 16, 4, 3, 17, 18, 2, 7, 1, 15, 10, -1, 22, 14, 20, 19, 13, 12, 23}),
new PuzzleState(new int[]{2, 18, 3, 11, 4, -1, 5, 6, 12, 1, 10, 20, 0, 7, 9, 21, 15, 14, 23, 19, 16, 22, 13, 8, 17}),
new PuzzleState(new int[]{0, 6, 8, 3, 1, 5, 2, 12, 9, 13, 16, 14, 19, 7, 18, 10, 11, -1, 4, 15, 20, 17, 23, 21, 22}),
new PuzzleState(new int[]{1, 16, 10, 4, 3, 0, 15, 2, 9, -1, 8, 5, 23, 12, 6, 21, 18, 14, 13, 11, 20, 22, 7, 19, 17}),
new PuzzleState(new int[]{1, 7, 6, 3, 4, 0, 2, 14, 5, 22, 18, 21, 16, 9, 13, 10, 20, -1, 8, 17, 15, 23, 11, 19, 12}),
new PuzzleState(new int[]{5, 0, 1, 7, 9, 11, 8, 4, 2, 14, 15, 17, 18, -1, 3, 20, 10, 12, 22, 19, 16, 6, 13, 21, 23}),
new PuzzleState(new int[]{5, 0, 6, 14, 7, 13, 15, 1, 3, 10, 20, 9, 17, 4, 2, 11, 12, 8, 19, -1, 21, 16, 22, 18, 23}),
new PuzzleState(new int[]{12, 7, 8, 4, 9, 6, 11, 15, 2, 1, 5, -1, 13, 16, 3, 17, 0, 10, 18, 14, 20, 22, 21, 19, 23}),
new PuzzleState(new int[]{15, 1, 2, 3, 14, -1, 20, 9, 4, 19, 0, 6, 7, 16, 13, 10, 5, 12, 17, 18, 22, 11, 21, 23, 8}),
new PuzzleState(new int[]{0, 1, 17, -1, 14, 6, 4, 2, 3, 16, 10, 18, 13, 19, 9, 7, 5, 8, 21, 22, 11, 20, 15, 12, 23}),
new PuzzleState(new int[]{5, 11, 9, 0, 3, 8, 14, -1, 6, 4, 1, 13, 7, 2, 19, 10, 21, 18, 23, 17, 15, 20, 12, 16, 22}),
new PuzzleState(new int[]{2, 0, 14, -1, 4, 18, 1, 10, 12, 13, 5, 9, 11, 22, 7, 15, 8, 17, 19, 3, 20, 21, 6, 16, 23}),
new PuzzleState(new int[]{0, 1, 13, 9, 2, 6, 8, 22, 3, 4, 12, 16, 10, 7, 19, -1, 5, 11, 14, 17, 15, 20, 21, 18, 23}),
new PuzzleState(new int[]{0, 13, 17, 8, 3, 5, 1, 12, 14, 4, 10, -1, 6, 7, 9, 15, 23, 2, 16, 19, 20, 11, 21, 22, 18}),
new PuzzleState(new int[]{5, 10, 7, 2, 9, 15, 0, -1, 1, 3, 18, 4, 17, 12, 14, 21, 11, 6, 8, 23, 20, 16, 22, 19, 13}),
new PuzzleState(new int[]{0, 3, 1, 2, 4, 10, 5, 7, 8, 9, 11, 6, 21, 13, 12, 20, 17, -1, 14, 19, 22, 18, 15, 16, 23}),
new PuzzleState(new int[]{0, 2, 7, 11, 13, 3, 14, 1, 4, 9, 5, -1, 12, 8, 18, 20, 10, 15, 22, 23, 17, 16, 6, 21, 19}),
new PuzzleState(new int[]{0, 16, 3, 22, 7, 11, 6, -1, 9, 4, 2, 1, 13, 12, 18, 5, 10, 8, 19, 14, 15, 20, 17, 23, 21}),
new PuzzleState(new int[]{0, 13, 5, 12, 3, 2, 10, 4, 6, 8, 1, 21, 19, 14, 9, 17, 23, 22, 16, 11, 15, 7, 20, -1, 18}),
new PuzzleState(new int[]{14, 5, 6, 12, 4, 10, 20, 1, 0, 23, 2, 16, 13, 19, 3, 15, 22, -1, 9, 8, 11, 7, 18, 17, 21}),
new PuzzleState(new int[]{0, 1, 2, 4, 7, 5, 11, -1, 18, 8, 16, 10, 12, 13, 3, 17, 6, 21, 23, 9, 15, 20, 22, 14, 19}),
new PuzzleState(new int[]{1, 6, 7, 3, 4, 5, 17, 0, 22, 12, 10, 15, 8, -1, 14, 11, 13, 16, 18, 19, 20, 2, 21, 9, 23}),
};
{
new PuzzleState(new int[]{0, 5, 1, 3, 4, 15, 2, 8, 10, 9, 22, 16, 11, 6, 14, 7, 21, 23, 12, 18, 20, -1, 17, 13, 19}),
new PuzzleState(new int[]{0, 12, 8, 13, 4, 3, 16, 2, 1, 9, 21, 5, 6, 10, 14, 7, 17, 20, 18, -1, 15, 11, 22, 23, 19}),
new PuzzleState(new int[]{1, 3, 7, 9, 8, 13, 17, 2, 4, 6, 15, 5, 22, 12, 14, 11, 0, 10, 21, -1, 20, 18, 16, 23, 19}),
new PuzzleState(new int[]{5, 2, 16, 14, 4, 3, 0, 8, 9, 11, 15, 6, 17, 19, 7, 1, 10, -1, 23, 18, 20, 12, 21, 13, 22}),
new PuzzleState(new int[]{0, 6, 1, 4, 13, 10, 2, 16, 7, 3, 20, -1, 8, 14, 9, 21, 5, 18, 11, 19, 17, 15, 12, 22, 23}),
new PuzzleState(new int[]{5, 0, 1, 4, 8, 10, 6, 7, 12, 3, 17, 16, 21, 2, 9, 18, 20, 13, 14, 19, 11, -1, 23, 15, 22}),
new PuzzleState(new int[]{1, 9, 2, 13, 17, 5, 7, 8, 3, 22, 6, -1, 16, 12, 4, 15, 18, 0, 23, 14, 10, 21, 11, 20, 19}),
new PuzzleState(new int[]{1, 2, 11, 13, 4, 21, 7, 3, 6, 9, 0, 8, 10, 19, 14, 20, 12, 16, 23, -1, 5, 17, 15, 22, 18}),
new PuzzleState(new int[]{2, 0, 1, 4, 13, 6, 7, 3, 8, 9, 22, 15, 10, 14, 18, 5, 12, -1, 17, 21, 20, 11, 23, 16, 19}),
new PuzzleState(new int[]{0, 1, 2, 8, 3, 6, 12, 22, 9, 7, 11, 21, 13, 4, 14, 5, 10, -1, 18, 19, 20, 15, 16, 23, 17}),
new PuzzleState(new int[]{1, 2, 3, 4, 8, 0, 6, 15, 14, 18, 16, 17, 20, -1, 9, 10, 12, 22, 11, 13, 21, 7, 5, 19, 23}),
new PuzzleState(new int[]{0, 5, 2, 4, 9, 7, 15, 20, 12, 13, 6, -1, 22, 1, 8, 10, 11, 23, 14, 3, 21, 16, 17, 19, 18}),
new PuzzleState(new int[]{0, 1, 9, 6, 13, 5, 18, -1, 4, 2, 15, 12, 3, 17, 7, 16, 10, 8, 23, 14, 20, 21, 19, 11, 22}),
new PuzzleState(new int[]{11, 5, 12, 3, 4, 15, 8, 0, 7, 1, 6, -1, 19, 2, 9, 16, 10, 13, 17, 23, 20, 21, 22, 14, 18}),
new PuzzleState(new int[]{10, 0, 1, 3, 4, 18, 5, 6, 12, 9, 7, 11, 8, -1, 22, 15, 23, 14, 19, 13, 20, 2, 17, 16, 21}),
new PuzzleState(new int[]{19, -1, 6, 2, 4, 0, 21, 10, 3, 9, 1, 15, 17, 8, 14, 11, 13, 22, 7, 18, 16, 12, 5, 23, 20}),
new PuzzleState(new int[]{11, 6, 3, 4, 9, 1, 10, 16, 2, 7, 5, 0, 13, -1, 12, 21, 8, 18, 17, 14, 15, 20, 22, 23, 19}),
new PuzzleState(new int[]{0, 1, 5, 3, 4, -1, 6, 2, 15, 10, 7, 8, 23, 16, 13, 22, 11, 9, 12, 14, 20, 21, 18, 17, 19}),
new PuzzleState(new int[]{10, 0, 1, -1, 2, 6, 5, 4, 13, 9, 16, 17, 12, 8, 19, 20, 15, 7, 21, 11, 22, 18, 14, 23, 3}),
new PuzzleState(new int[]{1, 0, 5, 3, 9, 20, 15, 7, 2, 14, 6, 4, 12, -1, 8, 13, 18, 10, 23, 11, 21, 16, 17, 19, 22}),
new PuzzleState(new int[]{0, 7, 6, 3, 4, 15, 1, 2, 8, 18, 11, 5, 13, -1, 22, 17, 16, 23, 14, 9, 20, 10, 12, 19, 21}),
new PuzzleState(new int[]{5, 7, 0, 2, 9, 10, 1, 11, 3, 4, 16, 22, 8, 14, 17, 15, 20, 12, 13, 6, 21, 23, 19, -1, 18}),
new PuzzleState(new int[]{3, 0, 1, 5, 4, 11, 6, 2, 16, 9, 15, 10, 7, 12, 13, 21, 19, -1, 22, 8, 20, 17, 14, 18, 23}),
new PuzzleState(new int[]{6, 0, 3, 2, 4, 5, 1, 8, 13, 12, 15, 14, 10, 7, 9, -1, 22, 11, 19, 23, 16, 20, 17, 21, 18}),
new PuzzleState(new int[]{11, 5, 6, 8, 9, 0, 21, 16, 4, 3, 17, 18, 2, 7, 1, 15, 10, -1, 22, 14, 20, 19, 13, 12, 23}),
new PuzzleState(new int[]{2, 18, 3, 11, 4, -1, 5, 6, 12, 1, 10, 20, 0, 7, 9, 21, 15, 14, 23, 19, 16, 22, 13, 8, 17}),
new PuzzleState(new int[]{0, 6, 8, 3, 1, 5, 2, 12, 9, 13, 16, 14, 19, 7, 18, 10, 11, -1, 4, 15, 20, 17, 23, 21, 22}),
new PuzzleState(new int[]{1, 16, 10, 4, 3, 0, 15, 2, 9, -1, 8, 5, 23, 12, 6, 21, 18, 14, 13, 11, 20, 22, 7, 19, 17}),
new PuzzleState(new int[]{1, 7, 6, 3, 4, 0, 2, 14, 5, 22, 18, 21, 16, 9, 13, 10, 20, -1, 8, 17, 15, 23, 11, 19, 12}),
new PuzzleState(new int[]{5, 0, 1, 7, 9, 11, 8, 4, 2, 14, 15, 17, 18, -1, 3, 20, 10, 12, 22, 19, 16, 6, 13, 21, 23}),
new PuzzleState(new int[]{5, 0, 6, 14, 7, 13, 15, 1, 3, 10, 20, 9, 17, 4, 2, 11, 12, 8, 19, -1, 21, 16, 22, 18, 23}),
new PuzzleState(new int[]{12, 7, 8, 4, 9, 6, 11, 15, 2, 1, 5, -1, 13, 16, 3, 17, 0, 10, 18, 14, 20, 22, 21, 19, 23}),
new PuzzleState(new int[]{15, 1, 2, 3, 14, -1, 20, 9, 4, 19, 0, 6, 7, 16, 13, 10, 5, 12, 17, 18, 22, 11, 21, 23, 8}),
new PuzzleState(new int[]{0, 1, 17, -1, 14, 6, 4, 2, 3, 16, 10, 18, 13, 19, 9, 7, 5, 8, 21, 22, 11, 20, 15, 12, 23}),
new PuzzleState(new int[]{5, 11, 9, 0, 3, 8, 14, -1, 6, 4, 1, 13, 7, 2, 19, 10, 21, 18, 23, 17, 15, 20, 12, 16, 22}),
new PuzzleState(new int[]{2, 0, 14, -1, 4, 18, 1, 10, 12, 13, 5, 9, 11, 22, 7, 15, 8, 17, 19, 3, 20, 21, 6, 16, 23}),
new PuzzleState(new int[]{0, 1, 13, 9, 2, 6, 8, 22, 3, 4, 12, 16, 10, 7, 19, -1, 5, 11, 14, 17, 15, 20, 21, 18, 23}),
new PuzzleState(new int[]{0, 13, 17, 8, 3, 5, 1, 12, 14, 4, 10, -1, 6, 7, 9, 15, 23, 2, 16, 19, 20, 11, 21, 22, 18}),
new PuzzleState(new int[]{5, 10, 7, 2, 9, 15, 0, -1, 1, 3, 18, 4, 17, 12, 14, 21, 11, 6, 8, 23, 20, 16, 22, 19, 13}),
new PuzzleState(new int[]{0, 3, 1, 2, 4, 10, 5, 7, 8, 9, 11, 6, 21, 13, 12, 20, 17, -1, 14, 19, 22, 18, 15, 16, 23}),
new PuzzleState(new int[]{0, 2, 7, 11, 13, 3, 14, 1, 4, 9, 5, -1, 12, 8, 18, 20, 10, 15, 22, 23, 17, 16, 6, 21, 19}),
new PuzzleState(new int[]{0, 16, 3, 22, 7, 11, 6, -1, 9, 4, 2, 1, 13, 12, 18, 5, 10, 8, 19, 14, 15, 20, 17, 23, 21}),
new PuzzleState(new int[]{0, 13, 5, 12, 3, 2, 10, 4, 6, 8, 1, 21, 19, 14, 9, 17, 23, 22, 16, 11, 15, 7, 20, -1, 18}),
new PuzzleState(new int[]{14, 5, 6, 12, 4, 10, 20, 1, 0, 23, 2, 16, 13, 19, 3, 15, 22, -1, 9, 8, 11, 7, 18, 17, 21}),
new PuzzleState(new int[]{0, 1, 2, 4, 7, 5, 11, -1, 18, 8, 16, 10, 12, 13, 3, 17, 6, 21, 23, 9, 15, 20, 22, 14, 19}),
new PuzzleState(new int[]{1, 6, 7, 3, 4, 5, 17, 0, 22, 12, 10, 15, 8, -1, 14, 11, 13, 16, 18, 19, 20, 2, 21, 9, 23}),
};
private static final int[] FINISHED_STATE = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, -1};

View File

@@ -26,7 +26,7 @@ package net.runelite.client.plugins.reorderprayers;
import net.runelite.api.Prayer;
import static net.runelite.api.Prayer.*;
import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test;
public class ReorderPrayersPluginTest

View File

@@ -42,8 +42,8 @@ import net.runelite.api.coords.LocalPoint;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.Notifier;
@@ -430,7 +430,7 @@ public class SlayerPluginTest
}
@Test
public void testTaskLookupInvalid() throws IOException
public void testTaskLookupInvalid()
{
net.runelite.http.api.chat.Task task = new net.runelite.http.api.chat.Task();
task.setTask("task<");

View File

@@ -32,7 +32,7 @@ import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.config.OpenOSRSConfig;
import net.runelite.client.events.ConfigChanged;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -79,6 +79,6 @@ public class TimestampPluginTest
String testOutput = "[2019:04:07:15:03:58:36]";
TimeZone timeZone = TimeZone.getTimeZone("America/New_York");
plugin.getFormatter().setTimeZone(timeZone);
assertTrue(plugin.generateTimestamp(testInput, timeZone.toZoneId()).equals(testOutput));
assertEquals(plugin.generateTimestamp(testInput, timeZone.toZoneId()), testOutput);
}
}

View File

@@ -25,9 +25,9 @@
package net.runelite.client.plugins.timetracking.clocks;
import java.time.format.DateTimeParseException;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
public class ClockPanelTest
{

View File

@@ -26,10 +26,14 @@ package net.runelite.client.plugins.timetracking.farming;
import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ErrorCollector;
import static org.hamcrest.Matchers.*;
public class PatchImplementationTest
{

View File

@@ -35,16 +35,15 @@ import net.runelite.api.Client;
import net.runelite.api.events.ChatMessage;
import net.runelite.client.Notifier;
import net.runelite.client.config.OpenOSRSConfig;
import net.runelite.client.game.ItemManager;
import net.runelite.client.ui.overlay.OverlayManager;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
@@ -87,6 +86,10 @@ public class WoodcuttingPluginTest
@Bind
OverlayManager overlayManager;
@Mock
@Bind
private ItemManager itemManager;
@Before
public void before()
{
@@ -94,7 +97,6 @@ public class WoodcuttingPluginTest
}
@Test
@Ignore
public void testLogs()
{
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "You get some logs.", "", 0);
@@ -103,7 +105,6 @@ public class WoodcuttingPluginTest
}
@Test
@Ignore
public void testOakLogs()
{
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "You get some oak logs.", "", 0);
@@ -128,16 +129,15 @@ public class WoodcuttingPluginTest
}
@Test
@Ignore
public void testBirdsNest()
{
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BIRDS_NEST_MESSAGE, "", 0);
when(woodcuttingConfig.showNestNotification()).thenReturn(true);
woodcuttingPlugin.showNestNotification = true;
woodcuttingPlugin.onChatMessage(chatMessage);
verify(notifier).notify("A bird nest has spawned!");
when(woodcuttingConfig.showNestNotification()).thenReturn(false);
woodcuttingPlugin.showNestNotification = false;
woodcuttingPlugin.onChatMessage(chatMessage);
verifyNoMoreInteractions(notifier);
}

View File

@@ -28,7 +28,6 @@ package net.runelite.client.rs;
import org.junit.Test;
/**
*
* @author Adam
*/
public class ClientConfigLoaderTest

View File

@@ -29,13 +29,12 @@ import java.awt.Graphics2D;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotEquals;
import org.junit.Test;
public class OverlayManagerTest
{
class TestOverlay extends Overlay
static class TestOverlay extends Overlay
{
TestOverlay(OverlayPosition position, OverlayPriority priority)
{
@@ -75,11 +74,11 @@ public class OverlayManagerTest
Overlay a2 = new OverlayA();
Overlay b = new OverlayB();
// The same instance of the same overlay should be equal
assertTrue(a1.equals(a1));
assertEquals(a1, a1);
// A different instance of the same overlay should not be equal by default
assertFalse(a1.equals(a2));
assertNotEquals(a1, a2);
// A different instance of a different overlay should not be equal
assertFalse(a1.equals(b));
assertNotEquals(a1, b);
}
@Test

View File

@@ -25,16 +25,15 @@
package net.runelite.client.ui.overlay.components.table;
import java.awt.Color;
import java.awt.image.BufferedImage;
import org.junit.After;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
public class TableComponentTest
{
@Mock

View File

@@ -50,9 +50,7 @@ public class ColorUtilTest
public void colorTag()
{
COLOR_HEXSTRING_MAP.forEach((color, hex) ->
{
assertEquals("<col=" + hex + ">", ColorUtil.colorTag(color));
});
assertEquals("<col=" + hex + ">", ColorUtil.colorTag(color)));
}
@Test
@@ -81,9 +79,7 @@ public class ColorUtilTest
public void toHexColor()
{
COLOR_HEXSTRING_MAP.forEach((color, hex) ->
{
assertEquals("#" + hex, ColorUtil.toHexColor(color));
});
assertEquals("#" + hex, ColorUtil.toHexColor(color)));
}
@Test
@@ -99,9 +95,7 @@ public class ColorUtilTest
public void colorToHexCode()
{
COLOR_HEXSTRING_MAP.forEach((color, hex) ->
{
assertEquals(hex, ColorUtil.colorToHexCode(color));
});
assertEquals(hex, ColorUtil.colorToHexCode(color)));
}
@Test

View File

@@ -130,14 +130,14 @@ public class ImageUtilTest
@Test
public void grayscaleImage()
{
final BufferedImage[] grayscaleColors = new BufferedImage[] {
final BufferedImage[] grayscaleColors = new BufferedImage[]{
oneByOne(WHITE),
oneByOne(GRAY),
oneByOne(BLACK),
oneByOne(BLACK_HALF_TRANSPARENT),
oneByOne(BLACK_TRANSPARENT),
};
final BufferedImage[] nonGrayscaleColors = new BufferedImage[] {
final BufferedImage[] nonGrayscaleColors = new BufferedImage[]{
oneByOne(RED),
oneByOne(GREEN),
oneByOne(BLUE),
@@ -173,7 +173,7 @@ public class ImageUtilTest
assertEquals(12, stretched.getWidth());
assertEquals(34, stretched.getHeight());
final BufferedImage[] assertSameAfterResize = new BufferedImage[] {
final BufferedImage[] assertSameAfterResize = new BufferedImage[]{
oneByOne(WHITE),
oneByOne(GRAY),
oneByOne(BLACK),
@@ -327,7 +327,7 @@ public class ImageUtilTest
*
* @param expected The first {@link BufferedImage} to be compared.
* @param actual The second {@link BufferedImage} to be compared.
* @return A boolean indicating whether the given {@link BufferedImage}s are of the same image data.
* @return A boolean indicating whether the given {@link BufferedImage}s are of the same image data.
*/
private boolean bufferedImagesEqual(final @Nonnull BufferedImage expected, final @Nonnull BufferedImage actual)
{
@@ -368,7 +368,7 @@ public class ImageUtilTest
* Returns whether a {@link BufferedImage} contains only grayscale pixel data.
*
* @param image The image to be checked.
* @return A boolean indicating whether all of the given image's pixels are grayscale.
* @return A boolean indicating whether all of the given image's pixels are grayscale.
*/
private boolean isGrayscale(final @Nonnull BufferedImage image)
{
@@ -394,7 +394,7 @@ public class ImageUtilTest
* Creates a {@link BufferedImage} of a 1-by-1px image of the given color.
*
* @param color The color to use for the image's single pixel.
* @return A {@link BufferedImage} containing a single pixel of the given color.
* @return A {@link BufferedImage} containing a single pixel of the given color.
*/
private BufferedImage oneByOne(final @Nonnull Color color)
{
@@ -406,8 +406,8 @@ public class ImageUtilTest
* image.
*
* @param color The color to use for the centered pixel.
* @return A {@link BufferedImage} with completely transparent pixels and one pixel of the
* given color in the center.
* @return A {@link BufferedImage} with completely transparent pixels and one pixel of the
* given color in the center.
*/
private BufferedImage centeredPixel(final @Nonnull Color color)
{
@@ -422,7 +422,7 @@ public class ImageUtilTest
* @param width The desired width of the color image.
* @param height The desired height of the color image.
* @param color The desired color of the image.
* @return A {@link BufferedImage} of given dimensions filled with the given color.
* @return A {@link BufferedImage} of given dimensions filled with the given color.
*/
private BufferedImage solidColor(final int width, final int height, final @Nonnull Color color)
{