int num = rand();
int num = rand() % 9;
static int get_frame (void){	int num = rand();	for (int i = castle_frame; i > 2; i--)		num%=i+2;		num %= 4;	num %= 3;	castle_frame+=2;	castle_frame %= 16;	return num;}