Yatzy/Domain/TwoPairs.java

34 lines
670 B
Java

package Domain;
public class TwoPairs extends Category{
private Player player;
public TwoPairs(Player player) {
super("Twos", "Score of all the twos rolled.");
this.player = player;
}
@Override
public boolean correctCategory(int[] values){
int[] arr = new int[values.length];
int counter = 0;
for(int i : values){
}
return false;
}
@Override
public int getScore(){
int score = 0;
for(int i : player.getDice().getValues()){
if( i == 2 ){
score += i;
}
}
return score;
}
}