betting logic