mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-01 07:39:35 +01:00
Fikser problemer med kodestil
This commit is contained in:
parent
b2f8abd28c
commit
88d5686137
@ -42,7 +42,6 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
private final List<CardRectangle> chosenCards;
|
private final List<CardRectangle> chosenCards;
|
||||||
private final int maxCards;
|
private final int maxCards;
|
||||||
private final Stage stage;
|
private final Stage stage;
|
||||||
final TextButton confirmCards;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a new card choice screen
|
* Initializes a new card choice screen
|
||||||
@ -72,7 +71,7 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
stage = new Stage();
|
stage = new Stage();
|
||||||
inputMultiplexer.addProcessor(stage);
|
inputMultiplexer.addProcessor(stage);
|
||||||
|
|
||||||
confirmCards = new SimpleButton("Confirm cards", roboRallyWrapper.font).getButton();
|
TextButton confirmCards = new SimpleButton("Confirm cards", roboRallyWrapper.font).getButton();
|
||||||
stage.addActor(confirmCards);
|
stage.addActor(confirmCards);
|
||||||
confirmCards.setY(viewport.getWorldHeight() + 60);
|
confirmCards.setY(viewport.getWorldHeight() + 60);
|
||||||
confirmCards.setX(15);
|
confirmCards.setX(15);
|
||||||
|
@ -10,7 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
* This class generates a simple text button using a default skin
|
* This class generates a simple text button using a default skin
|
||||||
*/
|
*/
|
||||||
public class SimpleButton {
|
public class SimpleButton {
|
||||||
private TextButton button;
|
private final TextButton button;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new simple button
|
* Instantiates a new simple button
|
||||||
|
@ -447,7 +447,7 @@ public class Board {
|
|||||||
* @param direction The direction something is going
|
* @param direction The direction something is going
|
||||||
* @return True if a wall would stop its path
|
* @return True if a wall would stop its path
|
||||||
*/
|
*/
|
||||||
boolean moveIsStoppedByWall(Position robotPosition, Position newPosition, Direction direction) {
|
private boolean moveIsStoppedByWall(Position robotPosition, Position newPosition, Direction direction) {
|
||||||
return hasWallFacing(robotPosition, direction) || (isValidPosition(newPosition) &&
|
return hasWallFacing(robotPosition, direction) || (isValidPosition(newPosition) &&
|
||||||
hasWallFacing(newPosition, Direction.getReverseDirection(direction)));
|
hasWallFacing(newPosition, Direction.getReverseDirection(direction)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user