A Martingale betting strategy "solver". (PHP)