#include #include #include "math_functions.h" #include "pitch.h" pitch::pitch(void) { xpos = get_rand() * PITCH_ACTIVITY_RATE; ypos = get_rand() * PITCH_ACTIVITY_RATE; recognition = get_rand(); } // rules for type returning if the pitch is outside 1 x 1 box return a take sign // if the pitch is not atleast fifty perent recognized return take sign char pitch::getType() { if ((xpos < XLEFT) || (xpos > XRIGHT) || (ypos < YTOP) || (ypos > YBOTTOM)) return 'T'; //return take else if ( recognition