[thelist] Java - What does this mean?

Arlen.P.Walker at jci.com Arlen.P.Walker at jci.com
Wed Mar 7 17:03:38 CST 2001


>I know there is not any supporting information here, but I don't know what
>to add to make it any clearer.  Can someone tell me what this means?  You
>don't have to get specific.  Just a rough outline will do.
>
>for(int i = 7; i < 11; i++) {
>if(stack[i].getNCards() != 13) return false;

At a guess, it's testing to see if you won your game of solitaire. ;{>}

It's looking for 13 cards in each of four stacks (stack numbers 7-10) which
are, coincidentally, located after 7 other stacks (0-6).

Assumptions leading to this guess:
1) "stack" indeed means stack.
2) getNCards is a function which returns the number of cards in the stack.
(After all, N could mean other things than number. "New," for example.)

I'll leave the identification of the variety of solitaire as an exercise
for the reader. ;{>}

Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

Arlen.P.Walker at JCI.Com
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.





More information about the thelist mailing list