Opprydding av ubrukte klasser og metoder

Fjerner Action.java
Endrer Checkmate.txt tilbake til det offisielle brettet
Endrer Game til å bevege roboten framover i stedet for en spesifikk retning
Fjerner konseptet om døde roboter i Board
Fjerner interface for kort
Fjerner metoder for å sjekke om vegger og roboter har roterte teksturer
Fjerner utkommentert testkode av tekst input
Endrer litt testkode slik at alle roboter er brukt i koden
This commit is contained in:
2020-02-25 17:45:39 +01:00
parent e51ac1da92
commit 8e60e1558e
10 changed files with 80 additions and 117 deletions

View File

@ -108,7 +108,7 @@ public final class IOUtil {
Direction direction;
if (element.getClass().isAssignableFrom(Robot.class)) {
Robot robot = (Robot) element;
hasRotatedTexture = TextureConverterUtil.hasRotatedTexture(robot);
hasRotatedTexture = false;
direction = robot.getFacingDirection();
} else if (element.getClass().isAssignableFrom(Tile.class)) {
Tile tile = (Tile) element;
@ -116,7 +116,7 @@ public final class IOUtil {
direction = tile.getDirection();
} else if (element.getClass().isAssignableFrom(Wall.class)) {
Wall wall = (Wall) element;
hasRotatedTexture = TextureConverterUtil.hasRotatedTexture(wall);
hasRotatedTexture = true;
direction = wall.getDirection();
} else {
throw new IllegalArgumentException("Unknown element type passed to function.");

View File

@ -110,24 +110,6 @@ public final class TextureConverterUtil {
return tileSheetTileHasRotatedTextureMappings.get(tile.getTileType());
}
/**
* Checks whether a wall has textures for different rotations
* @param wall The wall to check
* @return True if rotated versions of the texture exists. False otherwise
*/
public static boolean hasRotatedTexture(Wall wall) {
return true;
}
/**
* Checks whether a robot has textures for different rotations
* @param robot The robot to check
* @return True if rotated versions of the texture exists. False otherwise
*/
public static boolean hasRotatedTexture(Robot robot) {
return false;
}
/**
* Loads mappings between a tile and texture
*