Legger til manglende kommentar for konstruktør

This commit is contained in:
Kristian Knarvik 2020-04-07 15:10:02 +02:00
parent 88102327a0
commit 136235d86b
3 changed files with 23 additions and 3 deletions

View File

@ -37,6 +37,10 @@ public class BoardActiveScreen extends AbstractScreen implements InputProcessor
private final int viewPortHeight = 12 * tileDimensions;
private final Viewport viewport;
/**
* Instantiates a new board active screen
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
*/
public BoardActiveScreen(final RoboRallyWrapper roboRallyWrapper) {
this.roboRallyWrapper = roboRallyWrapper;

View File

@ -46,8 +46,8 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
private final Stage stage;
/**
* Initializes a new card choice screen
* @param roboRallyWrapper The robo rally wrapper which is its parent
* Instantiates a new card choice screen
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
*/
public CardChoiceScreen(final RoboRallyWrapper roboRallyWrapper) {
this.roboRallyWrapper = roboRallyWrapper;
@ -243,9 +243,14 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
*/
class CardRectangle {
final Rectangle rectangle;
boolean selected = false;
final ProgrammingCard card;
boolean selected = false;
/**
* Instantiates a new card rectangle
* @param rectangle The rectangle of this card rectangle
* @param card The card of this card rectangle
*/
CardRectangle(Rectangle rectangle, ProgrammingCard card) {
this.rectangle = rectangle;
this.card = card;

View File

@ -17,6 +17,9 @@ import inf112.fiasko.roborally.utility.IOUtil;
import java.util.List;
/**
* This screen allows the host to wait for players to join
*/
public class LobbyScreen extends AbstractScreen {
private final RoboRallyWrapper roboRallyWrapper;
@ -24,6 +27,10 @@ public class LobbyScreen extends AbstractScreen {
private final Viewport viewport;
private final Stage stage;
/**
* Instantiates a new lobby screen
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
*/
public LobbyScreen(final RoboRallyWrapper roboRallyWrapper) {
camera = new OrthographicCamera();
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
@ -56,6 +63,10 @@ public class LobbyScreen extends AbstractScreen {
roboRallyWrapper.batch.setProjectionMatrix(camera.combined);
roboRallyWrapper.batch.begin();
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Joined players: " +
roboRallyWrapper.server.getPlayerNames().values().toString(),
applicationWidth / 2f - 380 / 2f,applicationHeight / 2f + 350,380, 1,
true);
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Click the button to start game",
applicationWidth / 2f - 380 / 2f,applicationHeight / 2f + 100,380, 1,
true);