For the straight, I got this code, but it doesn't work. Can somebody tell me what's wrong?
var
counter, min, look, K : integer;
temp, iSequence : integer;
for counter:=1 to Top do begin
min:=counter;
for look:=counter+1 to top do
if aDiceScores[look]<aDiceScores[min] then min:=look;
temp:= aDiceScores[min];
aDiceScores[min]:=aDiceScores[counter];
aDiceScores[counter]:=temp;
end;
iSequence := 0;
for K := 1 to 5 do
if aDiceScores[K] + 1 = aDiceScores[K + 1]
then inc(iSequence);
if iSequence = 5 then
iScoreLarge := 40;