There are six deliverables for this exercise. The new classes must have Javadoc comments or Python docstrings.
The Player abstract superclass. Since
this class doesn't have a body for the
placeBets, it can't be unit tested
directly.
A revised Passenger57 class. This
version will be a proper subclass of
Player, but still place bets on black until
the stake is exhausted. The existing unit test for
Passenger57 should continue to work
correctly after these changes.
The Martingale subclass of
Player.
A unit test class for Martingale.
This test should synthesize a fixed list of
Outcomes, Bins, and
calls a Martingale instance with various
sequences of reds and blacks to assure that the bet doubles
appropriately on each loss, and is reset on each win.
A revised Game class. This will check
the player's playing method before
calling placeBets, and do nothing if the
player withdraws. It will also call the player's
win and lose
methods for winning and losing bets.
A unit test class for the revised
Game class. Using a non-random generator
for Wheel, this should be able to confirm
correct operation of the Game for a number
of bets.