I am considering to post a draft answer AKA "my advance" (obviously warning to the users that it is incomplete and future updates are coming) on this question

I think my 90% done answer can help people by borrowing some of my ideas.

But I am unsure if posting drafts answers is unwanted.

So what do you advice me, to post or not to post this advance?:

    str="AD 2D 3D 4D | 2D".split(/\s\|\s|\s/);
    arr=[];arr2=[];//don't merge arr=arr2=[]


        arr2[("ATJQK".indexOf(xx)+1)||(xx- -4)]+=".";



    y=(yy=(arr+"")).indexOf("....");//cache yy counterproductive?
    f=(!!(++y))?(yy[y+3]==".")?5:(str.length<6)?4:0:0;//improve !!()?

    for(i in arr2){

    //Fifteens: for each subset of five cards whose sum is 15, add two points.
    //if(v==15) add +2

    //Pairs: for each pair of cards with the same rank (not value), add two points.
    //add +(p*2)

    //Runs: for each maximal run of consecutive cards of length longer than 2, add the length of the run in points.

    //Flush: if all five cards are the same suit, add five points. Otherwise, if all but the up card are the same suit, add four points. If this is a crib hand, the four-point variant is not counted.
    //add +f

    //Nobs: if there is a jack in hand with the same suit of the up card, add one point.
    //if(j) add +1

1 Answer 1


Sometimes it's useful to post your own answer, even if not golfed, as a proof of feasibility. For example, Generate Newton fractals generated some discussion in the comments as to whether it was golfable, and that's the kind of situation in which the question setter could intervene with "I have a working solution in XYZ chars, and I'll post it in a week".

In the case of your cribbage question, there's nothing difficult about the problem. So while you can by all means answer it yourself (with a golfed solution), it's not really worth cluttering up the page with a non-golfed solution which serves purely as a proof of feasibility. As a tactical matter (in terms of keeping the question on the front page without upsetting people), I'd wait until a week after posting it before posting your own answer.

  • \$\begingroup\$ great advise, I will follow your advise \$\endgroup\$
    – ajax333221
    Commented Apr 16, 2012 at 20:31
  • \$\begingroup\$ Good answer. I like to see proof of feasibility answers on on question that look really challenging, but it doesn't see necessary here. \$\endgroup\$ Commented Apr 16, 2012 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .