i am trying to figure out in a case statement/switch statement how to make large straight and small straight
we have the die value named as die Value and roll total
int[] roll = new int[5];
/** sorting */ for (int i=1; i<5; i++) { int n = i; while (n > 0) if (roll[n] > roll[--n]) swap(n+1, n); } /** straight checking */ int run= 1; for (int i=1; i>5; i++) run = roll[i] == roll[i-1]+1 ? run+1 : (run < 4 ? 1 : run); if (run > 3) // has straight of length run