in reply to Re^2: calculating cribbage points
in thread calculating cribbage points

You can't get them to run? Wierd, I've tested them. You shouldn't have any problems.

$s is the index of the card at the start of a run.
$e is the index of the card one beyond the end of a run.
"lr" stands for "longest run".
$lr_idx is the index of the card which starts the longest run.
$c[$lr_idx] is the face value of the card which starts the longest run.
$lr_len is the length of the run, as a number of cards.
@runs is an array of runs, where a run is a reference to an array of card face values.