Discussion:
Inconsistent Output
(too old to reply)
Adrian Rodrigo
2010-06-27 07:32:39 UTC
Permalink
Hey,

When using the provided input for human players only, the output when
someone orders up the dealer and goes alone is:

HumanPlayer 2 (KH,9H,10H,AC,JC) > Player 2 orders up Player 4 and is
going alone.

However, when using computer players only, the output in the same
situation (with seed 8) is:

Computer (CMA) Player 1 (JC,AH,9D,10C,JS) > Player 1 is going alone.

This seems like bad design since the printing code must be repeated for
both. I can fix our program by doing some dynamic type checking
workaround, but this is also pretty bad design.

Anyway, I was just wondering what we should do?

Renaud
Joanne Atlee
2010-06-27 10:11:14 UTC
Permalink
Hi Adrian, Renaud,
You're right. This is unfortunate.

At this point, I would be OK with either design (one that repeated code,
or one that had a workaround).


Jo


P.S. In this case, our_euchre doesn't repeat code: different code is
used to determine whether the player goes alone, sets different
conditions, and prints fragments of the output depending on the conditions.
Post by Adrian Rodrigo
Hey,
When using the provided input for human players only, the output when
HumanPlayer 2 (KH,9H,10H,AC,JC) > Player 2 orders up Player 4 and is
going alone.
However, when using computer players only, the output in the same
Computer (CMA) Player 1 (JC,AH,9D,10C,JS) > Player 1 is going alone.
This seems like bad design since the printing code must be repeated for
both. I can fix our program by doing some dynamic type checking
workaround, but this is also pretty bad design.
Anyway, I was just wondering what we should do?
Renaud
Loading...