mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-06-27 11:44:42 +02:00
Rydder i tester og kode
Fjerner en del unødvendige variabler i ProgrammingCardDeckTest Forenkler shuffle testen vesentlig Legger til en ekstra sjekk for integritet etter stokking av kort Fjerner ICardWithoutSuit siden den legger til mer kompleksitet enn nytteverdi
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
package inf112.fiasko.roborally.objects;
|
||||
|
||||
/**
|
||||
* This Interface describes a card without a card suit
|
||||
* @param <S> The value type
|
||||
* @param <T> The symbol type
|
||||
*/
|
||||
public interface ICardWithoutSuit<S,T> {
|
||||
/**
|
||||
* Gets the value of the card
|
||||
* @return The card value
|
||||
*/
|
||||
S getValue();
|
||||
|
||||
/**
|
||||
* Gets the symbol of the card
|
||||
* @return The card symbol
|
||||
*/
|
||||
T getSymbol();
|
||||
}
|
@ -5,9 +5,9 @@ import inf112.fiasko.roborally.element_properties.Action;
|
||||
/**
|
||||
* This class represents a programming card
|
||||
*/
|
||||
public class ProgrammingCard implements ICardWithoutSuit<Integer, Action> {
|
||||
public class ProgrammingCard {
|
||||
|
||||
private final Integer cardValue;
|
||||
private final int cardValue;
|
||||
private final Action cardAction;
|
||||
|
||||
/**
|
||||
@ -20,12 +20,18 @@ public class ProgrammingCard implements ICardWithoutSuit<Integer, Action> {
|
||||
this.cardAction = cardAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
/**
|
||||
* Gets the value of the programming card
|
||||
* @return The programming card value
|
||||
*/
|
||||
public int getValue() {
|
||||
return cardValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Gets the symbol of the programming card
|
||||
* @return The programming card symbol
|
||||
*/
|
||||
public Action getSymbol() {
|
||||
return cardAction;
|
||||
}
|
||||
|
Reference in New Issue
Block a user