added simulation code for betting strategy