Design

SevenReds is a Martingale player who places bets in Roulette. This player waits until the wheel has spun red seven times in a row before betting black.

Fields

  • int redCount ;

    The number of reds yet to go. This starts at 7, is reset to 7 on each non-red outcome, and decrements by 1 on each red outcome.

  • Note that we inherit betMultiple. This is initially 1, doubles with each loss and is reset to one on each win.

Methods

  • void placeBets();

    If redCount is zero, this places a bet on black, using the bet multiplier.

  • void winners(Bin outcomes);

    This is notification from the Game of all the winning outcomes. If this vector includes red, redCount is decremented. Otherwise, redCount is reset to 7.