Second Hint
Try removing irrelevant parts of the Diceroll code: the calls to roll_dice() and any_matches(). Without the call to any_matches(), you can remove the if statment, leaving
$successes = $successes + 1 on a line by itself.
Now compare the modified Diceroll code with the SequenceSearch code.