English subtitles

← 01-35 Making Changes

Get Embed Code
1 Language

Showing Revision 1 created 04/23/2012 by Amara Bot.

  1. So I've added 1 more test,
  2. but I've added a bunch of new hands,
  3. and since it seemed to be getting complicated,
  4. I documented what each hand is.
  5. And the key point here is one particular hand
  6. or one particular set of rankings which is a straight
  7. that goes from ace through 5.
  8. An ace, 2, 3, 4, 5.
  9. It's almost a straight flush, but we just missed, but that's not important.
  10. What's important is that it's a straight
  11. and that the ace is low,
  12. and this is the only hand or the only set of rankings
  13. in which the ace counts as a low card rather than a high card,
  14. and in our program, we'll mess that up in 2 ways.
  15. One is we won't even recognize this as a straight
  16. because we're counting the ace as being a 14, not as being a 1,
  17. so we won't know that it's a straight, and secondly,
  18. even if we did, we'd want to count the 5 as being the high card
  19. in this hand, not the ace.
  20. We've got to come up with something to deal with that,
  21. so let's see, what are the possibilities?
  22. Well, perhaps we want to modify the function straight.
  23. We also want to return the correct hand rank for this hand,
  24. so maybe we have to modify the function hand rank.
  25. And third, the card ranks probably have to change as well.
  26. We want the card ranks for this hand to have
  27. a 1 for the straight rather than a 14.
  28. And what do you think about the prospects of making 3 changes?
  29. Would you say that that's okay because the changes that you envision making
  30. seem to be small ones to the 3 functions?
  31. Would you say it's okay regardless of the size of the change?
  32. That's just the way it is. We have to put up with it.
  33. Or would you say we should be able to do better?
  34. And we should look for a solution that doesn't require
  35. changing all 3 functions.
  36. What would you vote for?