mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-07-31 04:05:26 +02:00
Rydder kraftig opp i koden
Legger til alle manglende kommentarer Fikser en del variabelnavn med feil camelCase Legger til en boks som gir beskjed om at et navn ikke kan være tomt Oppdaterer versjon i pom og readme Forenkler noen av testene Fjerner duplisert kode i tester Fikser problemer rapportert av Codacy Bytter navn på respons beholdere for å tydeliggjøre bruk Fjerner ubrukte metoder Fikser noen skrivefeil
This commit is contained in:
@@ -4,9 +4,9 @@ import com.esotericsoftware.kryo.Kryo;
|
||||
import inf112.fiasko.roborally.elementproperties.Action;
|
||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
||||
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
|
||||
import inf112.fiasko.roborally.networking.containers.GameStartInfo;
|
||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainer;
|
||||
import inf112.fiasko.roborally.networking.containers.ProgamsContainer;
|
||||
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
||||
import inf112.fiasko.roborally.networking.containers.PowerDownContainerResponse;
|
||||
import inf112.fiasko.roborally.networking.containers.ProgramsContainerResponse;
|
||||
import inf112.fiasko.roborally.networking.containers.ProgramAndPowerdownRequest;
|
||||
import inf112.fiasko.roborally.objects.Deck;
|
||||
import inf112.fiasko.roborally.objects.Player;
|
||||
@@ -30,17 +30,15 @@ public final class NetworkUtil {
|
||||
kryo.register(ErrorResponse.class);
|
||||
kryo.register(Deck.class);
|
||||
kryo.register(ProgrammingCard.class);
|
||||
kryo.register(GameStartInfo.class);
|
||||
kryo.register(GameStartInfoResponse.class);
|
||||
kryo.register(ArrayList.class);
|
||||
kryo.register(Player.class);
|
||||
kryo.register(RobotID.class);
|
||||
kryo.register(ProgrammingCardDeck.class);
|
||||
kryo.register(Action.class);
|
||||
kryo.register(ProgramAndPowerdownRequest.class);
|
||||
kryo.register(ProgamsContainer.class);
|
||||
kryo.register(PowerDownContainer.class);
|
||||
kryo.register(ProgramsContainerResponse.class);
|
||||
kryo.register(PowerDownContainerResponse.class);
|
||||
kryo.register(HashMap.class);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -366,6 +366,18 @@ public final class TextureConverterUtil {
|
||||
private final int xWest;
|
||||
private final int yWest;
|
||||
|
||||
/**
|
||||
* Instantiates a new texture converter container
|
||||
*
|
||||
* @param xNorth The x position of the texture for a north-facing instance of the object
|
||||
* @param yNorth The y position of the texture for a north-facing instance of the object
|
||||
* @param xEast The x position of the texture for a east-facing instance of the object
|
||||
* @param yEast The y position of the texture for a east-facing instance of the object
|
||||
* @param xSouth The x position of the texture for a south-facing instance of the object
|
||||
* @param ySouth The y position of the texture for a south-facing instance of the object
|
||||
* @param xWest The x position of the texture for a west-facing instance of the object
|
||||
* @param yWest The y position of the texture for a west-facing instance of the object
|
||||
*/
|
||||
TextureConverterContainer(int xNorth, int yNorth, int xEast, int yEast, int xSouth, int ySouth,
|
||||
int xWest, int yWest) {
|
||||
this.xNorth = xNorth;
|
||||
@@ -378,34 +390,74 @@ public final class TextureConverterUtil {
|
||||
this.yWest = yWest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the x position of the texture for a north-facing instance of the object
|
||||
*
|
||||
* @return The x position of the texture for a north-facing instance of the object
|
||||
*/
|
||||
public int getXNorth() {
|
||||
return xNorth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the y position of the texture for a north-facing instance of the object
|
||||
*
|
||||
* @return The y position of the texture for a north-facing instance of the object
|
||||
*/
|
||||
public int getYNorth() {
|
||||
return yNorth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the x position of the texture for a east-facing instance of the object
|
||||
*
|
||||
* @return The x position of the texture for a east-facing instance of the object
|
||||
*/
|
||||
public int getXEast() {
|
||||
return xEast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the y position of the texture for a east-facing instance of the object
|
||||
*
|
||||
* @return The y position of the texture for a east-facing instance of the object
|
||||
*/
|
||||
public int getYEast() {
|
||||
return yEast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the x position of the texture for a south-facing instance of the object
|
||||
*
|
||||
* @return The x position of the texture for a south-facing instance of the object
|
||||
*/
|
||||
public int getXSouth() {
|
||||
return xSouth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the y position of the texture for a south-facing instance of the object
|
||||
*
|
||||
* @return The y position of the texture for a south-facing instance of the object
|
||||
*/
|
||||
public int getYSouth() {
|
||||
return ySouth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the x position of the texture for a west-facing instance of the object
|
||||
*
|
||||
* @return The x position of the texture for a west-facing instance of the object
|
||||
*/
|
||||
public int getXWest() {
|
||||
return xWest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the y position of the texture for a west-facing instance of the object
|
||||
*
|
||||
* @return The y position of the texture for a west-facing instance of the object
|
||||
*/
|
||||
public int getYWest() {
|
||||
return yWest;
|
||||
}
|
||||
|
Reference in New Issue
Block a user