In reply to Daniel Mastropietro.

The TestWinner function gives the complete payout. Fo example, if a card is a winner both diagonally and horizontally, the TestWinner function detects that and returns a gain that is the sum of the prizes awarded.