[SOLUTION] Euchre Hands (#55)

James,

I see other solutions trying very hard to make sure
that two suits of the same color do not appear next
to each other. As a Euchre player, I would be quite
upset if the order of the suits changed during play.

Hold on there Tiger... I didn't say anything about
changing the suit order. We're only working with the
initial sort here.

I believe a "correct" implementation caches the
initial suit order for each player and holds that
until the hand is played out (even if black/red
suits eventually touch). Note that you will have to
order the hand twice though, once after the deal and
once after Trump is chosen.

    Well, the sort before the trump is chosen is outside the scope of
this quiz (and trivial to implement), so we're only talking about the
sort after trump has been chosen. However you are right, the sort
routine would only be called once per hand, not once per card. There
are several other card games where sort is called once per card, and I
didn't stop to think that Euchre wasn't one of them.

    That being said, in a card game where suits are important, I would
still prefer the suits in my hand to remain in a predictable order
rather than get shuffled around (no pun intended) depending on what
cards were in my hand.

Of course, this is all just *MY* opinion of right.
We've already heard of several others. This quiz
just isn't about those... :wink:

    And likewise this is just *my* opinion of right. But I would argue
that this quiz *is* about other opinions, since the original quiz
stated:

The three non-Trump suits are equal, but it is good

? interface to sort the by suit alternating red, black,

red, and black, I think.

    If the "I think" had been left off, this would have simply been a
requirement of the quiz. But since it is there, I would argue that this
topic is open for discussion. I just gave a solution that showed a
differing viewpoint. I'm sorry if I stepped on any toes.

    - Warren Brown

P.S. Tiger??? :o)

I'm sorry if I stepped on any toes.

No offense taken. I just wanted it to be clear I'm against shifting hands too.

P.S. Tiger??? :o)

I'm just full of wacky expressions. :wink:

James Edward Gray II

ยทยทยท

On Nov 23, 2005, at 8:47 AM, Warren Brown wrote: