Fixes a unit test that was broken because I can’t do simple addition.
Instead of repurposing runInSet to give the result for an ordered set, I’ve decided to make a separate method for that and leave runInSet as-is, to indicate whether any hand ordering would produce a run.
Fixes a test case bug — by just feeding an empty hand a set, the joker wasn’t detected. The cards have to be in the hand for the hand’s runInSet: or runInOrderedSet: methods to work.
Splits up positive and negative tests for runs into separate test methods, and adds a couple of new test cases.
Adds a reverse sort, to put a hand in descending order instead of ascending.
Adds more runInOrderedSet test cases, this time the inverse of the previous ones to make sure descending series of cards are also counted as runs.
Fleshes out the method to detect runs in ordered sets. It now passes all test cases. Which probably just means I need more test cases.
Adds some notes on improving the hand logic, optimal vs actual scoring, etc.