
system "Penthouse System v1"
{
**************************************************
* http://208.44.116.116/302systems/Penthouse.pdf *
*     Discussed by Catman on the VIP Lounge      *
**************************************************
                 Rx-ed by St0rm0r

--------------------------------------------------
                   00-c0mpatible
--------------------------------------------------
Bet selection
Dozens, same as last (ignore the 0's)
progression: 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5 (Total 45)
On a loss, go up +1 in the progression
On a win, go down -2 in the progression
Stop win: 30 units
Stop loss: at the end of the progression
--------------------------------------------------
}
method "main"
begin
// section 1: do this once
while starting new session
    begin
    call "init"
    exit
    end

// section 2: do the tracking
track last dozen for 1 time record"last D"layout

// section 3: act on a loss
if net < 0
    begin
    add 100% net record"profit"data
    add 1 record"pro"data index
    if record"pro"data index > record"pro"data count
        begin
        put 1 record"pro"data index
        end
    end

// section 4:act on a win
if net > 0
    begin
    add 100% net record"profit"data
    subtract 2 record"pro"data index
    if record"pro"data index < 1
        begin
        put 1 record"pro"data index
        end
    if record"profit"data >= 30
        begin
        put 0 record"profit"data
        put 1 record"pro"data index
        end
    end

//bet
put 100% record"pro"data on record"last D"layout
multiply by 100% record"unit"data on record"last D"layout
end

// subroutines
method "init"
begin
group
    begin
    display "Penthouse System v1"
    input data "Base Betting Unit: " record"unit"data
    end
set list [1,1,1,2,2,2,3,3,3,4,4,4,5,5,5] record"pro"data
put 1 record"pro"data index
put 0 record"profit"data
end
