#include "strategy.h" #include "myrand.h" void strategy::initialize(long *x) { } void strategy::was_successful(long *x) { } long strategy1::choose_time(long *x) { return 20; } long strategy2::choose_time(long *x) { return myrand::uniform(3, 50); } long strategy3::choose_time(long *x) { return myrand::exp(3, 7); } void strategy4::initialize(long *x) { *x = myrand::uniform(5, 15); } long strategy4::choose_time(long *x) { long oldx = *x; *x = 2 * *x + 3; return oldx; } void strategy4::was_successful(long *x) { if ((*x -= 2) < 3) *x = 3; } void strategy5::initialize(long *x) { } long strategy5::choose_time(long *x) { return 20; } void strategy5::was_successful(long *x) { }