mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cb678b419b
15
docs/team/referater/referat_30_04_2020.md
Normal file
15
docs/team/referater/referat_30_04_2020.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## Oppmøte
|
||||||
|
Tilstede: Steinar, Gabriel, Kristian, Torbjørn, Petter
|
||||||
|
Ikke tilstede:
|
||||||
|
|
||||||
|
## Agenda
|
||||||
|
- Fortsette arbeidet med MVP
|
||||||
|
|
||||||
|
- Begynne på innleveringsdokumentet
|
||||||
|
|
||||||
|
## Møte
|
||||||
|
Fortsetter arbeidet på MVP og begynner å ta fatt på presentasjonen som skal holdes på mandag. Bestemmer oss og
|
||||||
|
for å dele oss opp i arbeidsgrupper ettersom oppgavene på MVP ikke lengre er så mange, samtidig som vi må få
|
||||||
|
gjort presentasjonen. Diskuterer de forskjellige punktene som må være med på presentasjonen.
|
||||||
|
Bestemmer oss for å ha et test møte på zoom for å passse på at alt fungerer som det skal fram mot
|
||||||
|
mandag.
|
@ -161,8 +161,8 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen {
|
|||||||
*/
|
*/
|
||||||
private void generateCards(ProgrammingCardDeck deck) {
|
private void generateCards(ProgrammingCardDeck deck) {
|
||||||
List<ProgrammingCard> cardList = deck.getCards();
|
List<ProgrammingCard> cardList = deck.getCards();
|
||||||
float cardWidth = viewport.getWorldWidth() / 3;
|
float cardWidth = viewport.getWorldWidth() / 3.2f;
|
||||||
float cardHeight = (viewport.getWorldHeight() - 30) / 3;
|
float cardHeight = (viewport.getWorldHeight() - 30) / 3.2f;
|
||||||
for (int i = 0; i < cardList.size(); i++) {
|
for (int i = 0; i < cardList.size(); i++) {
|
||||||
ProgrammingCard programmingCard = cardList.get(i);
|
ProgrammingCard programmingCard = cardList.get(i);
|
||||||
generateCardRectangle(i, cardWidth, cardHeight, programmingCard, true);
|
generateCardRectangle(i, cardWidth, cardHeight, programmingCard, true);
|
||||||
@ -211,6 +211,8 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen {
|
|||||||
renderCards();
|
renderCards();
|
||||||
shapeRenderer.end();
|
shapeRenderer.end();
|
||||||
roboRallyWrapper.batch.begin();
|
roboRallyWrapper.batch.begin();
|
||||||
|
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Press TAB to toggle the board", 10,
|
||||||
|
viewport.getWorldHeight() - 50);
|
||||||
renderCardText();
|
renderCardText();
|
||||||
roboRallyWrapper.batch.end();
|
roboRallyWrapper.batch.end();
|
||||||
stage.draw();
|
stage.draw();
|
||||||
@ -255,7 +257,7 @@ public class CardChoiceScreen extends InteractiveScreen implements Screen {
|
|||||||
private void renderCardText() {
|
private void renderCardText() {
|
||||||
roboRallyWrapper.font.setColor(YELLOW);
|
roboRallyWrapper.font.setColor(YELLOW);
|
||||||
for (CardRectangle cardRectangle : cardRectangles) {
|
for (CardRectangle cardRectangle : cardRectangles) {
|
||||||
roboRallyWrapper.font.getData().setScale(0.8f);
|
roboRallyWrapper.font.getData().setScale(0.7f);
|
||||||
GlyphLayout layout = new GlyphLayout(roboRallyWrapper.font,
|
GlyphLayout layout = new GlyphLayout(roboRallyWrapper.font,
|
||||||
Integer.toString(cardRectangle.card.getPriority()));
|
Integer.toString(cardRectangle.card.getPriority()));
|
||||||
float fontX = (int) (cardRectangle.rectangle.x + (cardRectangle.rectangle.width - layout.width) - 28);
|
float fontX = (int) (cardRectangle.rectangle.x + (cardRectangle.rectangle.width - layout.width) - 28);
|
||||||
|
@ -34,7 +34,7 @@ public class LoadingScreen extends AbstractScreen {
|
|||||||
roboRallyWrapper.batch.setProjectionMatrix(camera.combined);
|
roboRallyWrapper.batch.setProjectionMatrix(camera.combined);
|
||||||
|
|
||||||
roboRallyWrapper.batch.begin();
|
roboRallyWrapper.batch.begin();
|
||||||
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Loading...", applicationWidth / 2f - 380 / 2f,
|
roboRallyWrapper.font.draw(roboRallyWrapper.batch, getLoadingText(), applicationWidth / 2f - 380 / 2f,
|
||||||
applicationHeight / 2f, 380, 1, true);
|
applicationHeight / 2f, 380, 1, true);
|
||||||
roboRallyWrapper.batch.end();
|
roboRallyWrapper.batch.end();
|
||||||
|
|
||||||
@ -44,6 +44,36 @@ public class LoadingScreen extends AbstractScreen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the correct loading text to display according to the game's state
|
||||||
|
*
|
||||||
|
* @return Text explaining what the game is waiting for
|
||||||
|
*/
|
||||||
|
private String getLoadingText() {
|
||||||
|
if (roboRallyWrapper.roboRallyGame == null) {
|
||||||
|
if (roboRallyWrapper.server == null) {
|
||||||
|
return "Waiting for host to start the game...";
|
||||||
|
}
|
||||||
|
return "Loading...";
|
||||||
|
}
|
||||||
|
System.out.println(roboRallyWrapper.roboRallyGame.getGameState());
|
||||||
|
switch (roboRallyWrapper.roboRallyGame.getGameState()) {
|
||||||
|
case WAITING_FOR_OTHER_PLAYERS_PROGRAMS:
|
||||||
|
return "Waiting for other players to finish programming...";
|
||||||
|
case WAITING_FOR_CARDS_FROM_SERVER:
|
||||||
|
return "Waiting for new cards from the server...";
|
||||||
|
case BEGINNING_OF_GAME:
|
||||||
|
return "Initializing new turn...";
|
||||||
|
case CHOOSING_CARDS:
|
||||||
|
return "Waiting for screen change...";
|
||||||
|
case SKIP_STAY_IN_POWER_DOWN:
|
||||||
|
return "Waiting for players to choose whether to stay in power down...";
|
||||||
|
default:
|
||||||
|
return "Waiting for something...";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes to another screen depending on which state the game is in
|
* Changes to another screen depending on which state the game is in
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user