[TIDY] Automated code cleanup

Thanks IntelliJ
This commit is contained in:
2023-04-22 05:40:41 +01:00
parent f10cdec09b
commit bc87301bac
9 changed files with 9 additions and 10 deletions

View File

@@ -99,8 +99,7 @@ public class GameBlockCoordinate {
*/
@Override public boolean equals(Object obj) {
if (obj == this) return true;
if (obj instanceof GameBlockCoordinate) {
GameBlockCoordinate other = (GameBlockCoordinate) obj;
if (obj instanceof GameBlockCoordinate other) {
return getX() == other.getX() && getY() == other.getY();
} else return false;
}

View File

@@ -12,5 +12,5 @@ public interface BlockClickedListener {
* Handle a block clicked event
* @param block the block that was clicked
*/
public void blockClicked(GameBlock block);
void blockClicked(GameBlock block);
}

View File

@@ -9,5 +9,5 @@ public interface CommunicationsListener {
* Handle an incoming message received by the Communicator
* @param communication the message that was received
*/
public void receiveCommunication(String communication);
void receiveCommunication(String communication);
}

View File

@@ -9,6 +9,6 @@ public interface GameLoopListener {
* Process the game loop being scheduled
* @param timerDelay delay until game loop is executed
*/
public void process(int timerDelay);
void process(int timerDelay);
}

View File

@@ -13,6 +13,6 @@ public interface LineClearedListener {
* Process the line(s) being cleared
* @param blockCoordinates coordinates of the blocks being cleared
*/
public void clearLine(Set<GameBlockCoordinate> blockCoordinates);
void clearLine(Set<GameBlockCoordinate> blockCoordinates);
}

View File

@@ -8,6 +8,6 @@ public interface MouseClickListener {
/**
* Handle node being right-clicked
*/
public void action();
void action();
}

View File

@@ -12,5 +12,5 @@ public interface NextPieceListener {
* @param currentPiece the piece that was received
* @param followingPiece the piece that was received for the next iteration
*/
public void nextPiece(GamePiece currentPiece, GamePiece followingPiece);
void nextPiece(GamePiece currentPiece, GamePiece followingPiece);
}

View File

@@ -10,6 +10,6 @@ public interface ShowScoresSceneListener {
/**
* Show the scene
*/
public void show(Game game);
void show(Game game);
}

View File

@@ -40,7 +40,7 @@ public class MultiplayerScene extends ChallengeScene {
/**
* Other players' live boards
*/
private MapProperty<String, SimpleIntegerProperty[][]> playerBoards = new SimpleMapProperty<>(FXCollections.observableHashMap());
private final MapProperty<String, SimpleIntegerProperty[][]> playerBoards = new SimpleMapProperty<>(FXCollections.observableHashMap());
/**
* Grid of other players' live boards