Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: RFC: Cribbage::Hand

by hv (Parson)
on Mar 31, 2006 at 17:12 UTC ( #540505=note: print w/ replies, xml ) Need Help??


in reply to RFC: Cribbage::Hand

The primary purpose of this meditation is to ask if people think there is a need for this on the CPAN.

Need? Probably not, but that's no reason not to release it.

I suspect the majority of people that might come across it are people who'd really rather be writing their own, but there'll be the occasional one that is happy to grab someone else's version so they can concentrate on making the cards look pretty.

It would help the former group, though, if the code was clear, and showed a clear link between the various aspects of hand-scoring and the code that handled each. Most potential users will not care about the speed as long as scoring 4 or 5 hands doesn't involve a noticeable (0.5s or so) delay.

Hugo


Comment on Re: RFC: Cribbage::Hand
Re^2: RFC: Cribbage::Hand
by Limbic~Region (Chancellor) on Mar 31, 2006 at 17:58 UTC
    hv,
    You have good points. I just find it odd that with everything under the sun, there isn't already one out there. With regards to your point on clarity and explanation - let me take this opportunity now to do so.

    Precalculating Scores

    Calculate Total Score

    I am not sure how fast this is compared to other approaches but I think it is a great start for someone interested in working on a Games::Cards::Cribbage.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://540505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2014-09-19 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (135 votes), past polls