Discussion:
A5: Sample Implementation Bug?
(too old to reply)
Jeremy Roman
2011-07-09 19:58:54 UTC
Permalink
Hello:

After doing my UML diagram, I figured I'd go ahead and implement
Assignment 5. During my testing to verify that my solution matches the
sample solution, I found what appears to be an error in the sample solution.

If you play with the alternate rules, computer players only, and the
default (zero) seed, this is how the fourth round begins:

A new round begins. It's player 4's turn to play.
Player 4 plays KD.
Player 1 plays KH.
Player 2 plays KC.
...

According to the alternate rules:

"Immediately following the deal, the player with the 8 of hearts goes
first. This player must play the 8 of hearts."

However, player 4 illegally plays the king of diamonds.

If this is a bug in the sample solution, would it be possible to have it
fixed? If not, could someone explain this behavior so that I can
implement it?

Thanks,
--
Jeremy Roman
Student, Computer Science
University of Waterloo
Ashif Harji
2011-07-10 04:21:13 UTC
Permalink
After doing my UML diagram, I figured I'd go ahead and implement Assignment
5. During my testing to verify that my solution matches the sample solution,
I found what appears to be an error in the sample solution.
If you play with the alternate rules, computer players only, and the default
A new round begins. It's player 4's turn to play.
Player 4 plays KD.
Player 1 plays KH.
Player 2 plays KC.
...
"Immediately following the deal, the player with the 8 of hearts goes first.
This player must play the 8 of hearts."
However, player 4 illegally plays the king of diamonds.
If this is a bug in the sample solution, would it be possible to have it
fixed? If not, could someone explain this behavior so that I can implement
it?
Yes, this is a bug. Thanks for letting me know. I've fixed the sample
executables. Let me know if you find any other problems.

ashif

Loading...