Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
"be consistent"
 
PerlMonks  

Re^2: calculating cribbage points

by dracos (Sexton)
on Mar 31, 2006 at 09:48 UTC ( [id://540479]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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

I'm sorry could some one explain what is up with the code for runs. I can't get it to work and I am having troubles figuring out how it is suspose to work.

Replies are listed 'Best First'.
Re^3: calculating cribbage points
by ikegami (Patriarch) on Mar 31, 2006 at 14:29 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://540479]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.