package Domain; public class Twos extends Category{ public Twos() { super("Twos", "Score of all the twos rolled."); } @Override public boolean correctCategory(int[] values){ for(int i : values){ if(i == 2){ return true; } } return false; } @Override public int getScore(int[] values){ int score = 0; for(int i : values){ if( i == 2 ){ score += 2; } } return score; } }