ucsb-cs56-projects / cs56-pokergame

-
0 stars 3 forks source link

Bug fix: Full house #16

Open shumarvin opened 8 years ago

shumarvin commented 8 years ago

When 2 or more players have a full house, the winner should be whoever has the next highest card. Sometimes, this doesn't happen, and an incorrect winner is displayed.

Points: 100pts

pconrad commented 8 years ago

Approved for 100 pts.

300 additional points (i.e. 400 pts total) if instead of JUST fixing this, you refactor the code FIRST so that you can write test cases that expose the bug. If the description by Marvin above is correct, then there are cases where the code does the right thing, and cases where the code does the wrong thing. My hope is that you can demonstrate this with test cases. Make a commit FIRST where there are test cases that pass, and test cases that fail, illustrating this bug.

Then, make all the test cases pass by fixing the bug. This is the industry standard practice in TDD-based shops: when you find a bug, the FIRST thing you do is write a test cases that EXPOSES the bug, then you fix it. That way, if the bug ever comes back, you'll know immediately.

JohnUCSB commented 8 years ago

F16 OK (100 pts, additional 300 pts for refactoring and testing)