# Add an event
# first, unclasp bra, then push tits.
def add_event(from,to,kind,msg=nil)
@bra.unclasp do
@tits.push(Event.new(from,to,kind,msg))
end
end
/* Function to call roar() after 3 calls to mew()
* each call produces 1 mew or 1 roar
* count is static and incremented each call
* When count is 3 we'll know it's time to Roar!
* Function is used in kitty.c.
*/
void mewroar()
{ /* body of void mewroar() */
static char count; /* count is automatically zero. char is 1 byte. It can hold numbers.
* 1 byte is better for this than 4 or 8 bytes.
*/
count++; /* add 1 to count.
* Could have used count = count + 1; Same thing.
*/
if (count == 3) /* if count is equal to three */
{
count = 0; /* reset the value of count for future calls. */
roar(); /* function roar() called one time! */
} /* End if statement for when count is 3 */
else /* if count was not equal to three */
{
mew(); /* function mew() called one time. */
}
} // End of void mewroar()
/* calls mew(). calls roar() instead on every 3rd call. */
void roar_on_3() {
static int count = 0;
if (++count == 3) {
count = 0;
roar();
}
else
mew();
}