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:
2020-04-22 23:14:06 +02:00
parent 6394bd9655
commit acab7345f2
36 changed files with 372 additions and 285 deletions

View File

@@ -6,7 +6,7 @@ package inf112.fiasko.roborally.elementproperties;
public enum GameState {
/**
* At the absolute start of the game, before anything has happended
* At the absolute start of the game, before anything has happened
*/
BEGINNING_OF_GAME,
/**
@@ -45,9 +45,13 @@ public enum GameState {
* Indicates that the game is no longer running
*/
EXITED,
/**
* Indicates that the game is in the process of skipping the power down screen
*/
SKIP_POWER_DOWN_SCREEN,
/**
* Indicates that the game is in the process of skipping the stay in power down screen
*/
SKIP_STAY_IN_POWER_DOWN
}

View File

@@ -1,5 +1,8 @@
package inf112.fiasko.roborally.elementproperties;
/**
* This enum represents all possible particle types
*/
public enum ParticleType {
/**
* The beam emitting from a single laser

View File

@@ -68,24 +68,81 @@ public enum TileType {
* A fast conveyor belt with one entrance on the right and one from behind
*/
CONVEYOR_BELT_FAST_SIDE_ENTRANCE_RIGHT(16),
/**
* The first flag a robot has to visit to win the game
*/
FLAG_1(17),
/**
* The second flag a robot has to visit to win the game
*/
FLAG_2(18),
/**
* The third flag a robot has to visit to win the game
*/
FLAG_3(19),
/**
* The fourth flag a robot has to visit to win the game
*/
FLAG_4(20),
/**
* A wrench which repairs a robot
*/
WRENCH(21),
/**
* A wrench and hammer which repairs a robot
*/
WRENCH_AND_HAMMER(22),
/**
* The spawn location belonging to the first robot
*/
ROBOT_SPAWN_1(23),
/**
* The spawn location belonging to the second robot
*/
ROBOT_SPAWN_2(24),
/**
* The spawn location belonging to the third robot
*/
ROBOT_SPAWN_3(25),
/**
* The spawn location belonging to the fourth robot
*/
ROBOT_SPAWN_4(26),
/**
* The spawn location belonging to the fifth robot
*/
ROBOT_SPAWN_5(27),
/**
* The spawn location belonging to the sixth robot
*/
ROBOT_SPAWN_6(28),
/**
* The spawn location belonging to the seventh robot
*/
ROBOT_SPAWN_7(29),
/**
* The spawn location belonging to the eight robot
*/
ROBOT_SPAWN_8(30),
/**
* A pit without edges a robot may fall into
*/
PIT_EMPTY(31),
/**
* A pit with all edges a robot may fall into
*/
PIT_FULL(32),
/**
* A pit with one edge a robot may fall into
*/
PIT_NORMAL(33),
/**
* A pit with two connected edges the robot may fall into
*/
PIT_CORNER(34),
/**
* A pit with three edges the robot may fall into
*/
PIT_U(35);
private final int tileTypeID;

View File

@@ -4,9 +4,21 @@ package inf112.fiasko.roborally.elementproperties;
* This enum represents all possible wall types
*/
public enum WallType {
/**
* A normal wall
*/
WALL_NORMAL(1),
/**
* A wall which consists of two connected walls
*/
WALL_CORNER(2),
/**
* A wall with a laser
*/
WALL_LASER_SINGLE(3),
/**
* A wall with two lasers
*/
WALL_LASER_DOUBLE(4);
private final int wallTypeID;