mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Flytter CardRectangle ut av CardChoiceScreen
This commit is contained in:
parent
2abf6d89a6
commit
fa0d53524c
@ -45,7 +45,7 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
private final int maxCards;
|
private final int maxCards;
|
||||||
private final Stage stage;
|
private final Stage stage;
|
||||||
private final InputMultiplexer inputMultiplexer;
|
private final InputMultiplexer inputMultiplexer;
|
||||||
private ProgrammingCardDeck deck;
|
private final ProgrammingCardDeck deck;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new card choice screen
|
* Instantiates a new card choice screen
|
||||||
@ -238,28 +238,4 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A helper class for keeping track of card information and a rectangle
|
|
||||||
*/
|
|
||||||
class CardRectangle {
|
|
||||||
protected final Rectangle rectangle;
|
|
||||||
protected final ProgrammingCard card;
|
|
||||||
protected 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return card.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package inf112.fiasko.roborally.gamewrapper.screens;
|
||||||
|
|
||||||
|
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A helper class for keeping track of card information and a rectangle
|
||||||
|
*/
|
||||||
|
public class CardRectangle {
|
||||||
|
protected final Rectangle rectangle;
|
||||||
|
protected final ProgrammingCard card;
|
||||||
|
protected 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return card.toString();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user