Kjører automtisk forbedring av importeringer og formatering

This commit is contained in:
Kristian Knarvik 2020-04-27 09:59:18 +02:00
parent 5207a6a0bc
commit 60295788e4
14 changed files with 44 additions and 45 deletions

View File

@ -18,7 +18,7 @@ import inf112.fiasko.roborally.gamewrapper.SimpleButton;
import inf112.fiasko.roborally.objects.ProgrammingCard; import inf112.fiasko.roborally.objects.ProgrammingCard;
import inf112.fiasko.roborally.objects.ProgrammingCardDeck; import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
import javax.swing.JOptionPane; import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -9,12 +9,12 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.viewport.FitViewport; import com.badlogic.gdx.utils.viewport.FitViewport;
import com.esotericsoftware.kryonet.Connection;
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper; import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
import inf112.fiasko.roborally.gamewrapper.SimpleButton; import inf112.fiasko.roborally.gamewrapper.SimpleButton;
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse; import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
import inf112.fiasko.roborally.objects.Player; import inf112.fiasko.roborally.objects.Player;
import inf112.fiasko.roborally.utility.IOUtil; import inf112.fiasko.roborally.utility.IOUtil;
import com.esotericsoftware.kryonet.Connection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -937,6 +937,7 @@ public class Board {
/** /**
* Gets a new particle type with the given number of beams * Gets a new particle type with the given number of beams
*
* @param forwardBeams The number of beams in the direction of the laser * @param forwardBeams The number of beams in the direction of the laser
* @param perpendicularBeams The number of beams in the perpendicular direction of the laser * @param perpendicularBeams The number of beams in the perpendicular direction of the laser
* @return The correct particle type to be displayed * @return The correct particle type to be displayed

View File

@ -5,12 +5,15 @@ import inf112.fiasko.roborally.elementproperties.TileType;
import inf112.fiasko.roborally.elementproperties.WallType; import inf112.fiasko.roborally.elementproperties.WallType;
import inf112.fiasko.roborally.objects.Board; import inf112.fiasko.roborally.objects.Board;
import inf112.fiasko.roborally.objects.Grid; import inf112.fiasko.roborally.objects.Grid;
import inf112.fiasko.roborally.objects.ListGrid;
import inf112.fiasko.roborally.objects.Robot; import inf112.fiasko.roborally.objects.Robot;
import inf112.fiasko.roborally.objects.Tile; import inf112.fiasko.roborally.objects.Tile;
import inf112.fiasko.roborally.objects.Wall; import inf112.fiasko.roborally.objects.Wall;
import inf112.fiasko.roborally.objects.ListGrid;
import java.io.*; import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List; import java.util.List;
/** /**

View File

@ -1,17 +1,17 @@
package inf112.fiasko.roborally.utility; package inf112.fiasko.roborally.utility;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.esotericsoftware.kryonet.Connection;
import inf112.fiasko.roborally.elementproperties.Direction; import inf112.fiasko.roborally.elementproperties.Direction;
import inf112.fiasko.roborally.elementproperties.Position; import inf112.fiasko.roborally.elementproperties.Position;
import inf112.fiasko.roborally.elementproperties.RobotID; import inf112.fiasko.roborally.elementproperties.RobotID;
import inf112.fiasko.roborally.objects.Player;
import inf112.fiasko.roborally.objects.Tile;
import inf112.fiasko.roborally.objects.DrawableGame; import inf112.fiasko.roborally.objects.DrawableGame;
import inf112.fiasko.roborally.objects.Wall;
import inf112.fiasko.roborally.objects.Particle;
import inf112.fiasko.roborally.objects.Robot;
import inf112.fiasko.roborally.objects.DrawableObject; import inf112.fiasko.roborally.objects.DrawableObject;
import com.esotericsoftware.kryonet.Connection; import inf112.fiasko.roborally.objects.Particle;
import inf112.fiasko.roborally.objects.Player;
import inf112.fiasko.roborally.objects.Robot;
import inf112.fiasko.roborally.objects.Tile;
import inf112.fiasko.roborally.objects.Wall;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -19,23 +19,21 @@
package inf112.fiasko.roborally; package inf112.fiasko.roborally;
import java.util.HashMap; import com.badlogic.gdx.ApplicationListener;
import java.util.Map; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.headless.HeadlessApplication;
import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration;
import com.badlogic.gdx.graphics.GL20;
import org.junit.runner.notification.RunNotifier; import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner; import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.FrameworkMethod; import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError; import org.junit.runners.model.InitializationError;
import com.badlogic.gdx.Gdx; import java.util.HashMap;
import com.badlogic.gdx.graphics.GL20; import java.util.Map;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.headless.HeadlessApplication;
import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration;
public class GdxTestRunner extends BlockJUnit4ClassRunner implements ApplicationListener { public class GdxTestRunner extends BlockJUnit4ClassRunner implements ApplicationListener {
private final Map<FrameworkMethod, RunNotifier> invokeInRender = new HashMap<>(); private final Map<FrameworkMethod, RunNotifier> invokeInRender = new HashMap<>();

View File

@ -10,9 +10,9 @@ import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.function.Predicate; import java.util.function.Predicate;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;

View File

@ -9,8 +9,8 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
@RunWith(GdxTestRunner.class) @RunWith(GdxTestRunner.class)
public class DrawableObjectTest { public class DrawableObjectTest {

View File

@ -5,15 +5,15 @@ import inf112.fiasko.roborally.utility.DeckLoaderUtil;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class ProgrammingCardDeckTest { public class ProgrammingCardDeckTest {
private ProgrammingCard programmingCard1; private ProgrammingCard programmingCard1;
private ProgrammingCard programmingCard3; private ProgrammingCard programmingCard3;

View File

@ -1,12 +1,11 @@
package inf112.fiasko.roborally.objects; package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.elementproperties.Action; import inf112.fiasko.roborally.elementproperties.Action;
import static org.junit.Assert.assertEquals;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class ProgrammingCardTest { public class ProgrammingCardTest {
private ProgrammingCard programmingCard1; private ProgrammingCard programmingCard1;

View File

@ -1,10 +1,5 @@
package inf112.fiasko.roborally.objects; package inf112.fiasko.roborally.objects;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import inf112.fiasko.roborally.elementproperties.Action; import inf112.fiasko.roborally.elementproperties.Action;
import inf112.fiasko.roborally.elementproperties.GameState; import inf112.fiasko.roborally.elementproperties.GameState;
import org.junit.Before; import org.junit.Before;
@ -13,6 +8,11 @@ import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class RoboRallyGameTest { public class RoboRallyGameTest {
private RoboRallyGame game; private RoboRallyGame game;

View File

@ -1,13 +1,12 @@
package inf112.fiasko.roborally.objects; package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.elementproperties.Position; import inf112.fiasko.roborally.elementproperties.Position;
import static org.junit.Assert.assertEquals;
import inf112.fiasko.roborally.elementproperties.RobotID; import inf112.fiasko.roborally.elementproperties.RobotID;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class RobotTest { public class RobotTest {
private final int nextFlag = 1; private final int nextFlag = 1;
private Position robotPosition; private Position robotPosition;

View File

@ -2,11 +2,10 @@ package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.elementproperties.Direction; import inf112.fiasko.roborally.elementproperties.Direction;
import inf112.fiasko.roborally.elementproperties.WallType; import inf112.fiasko.roborally.elementproperties.WallType;
import org.junit.Test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class WallTest { public class WallTest {
@Test @Test
public void testWallGetWallTypeNormal() { public void testWallGetWallTypeNormal() {