#include //for rand function #include "rabbit.h" using namespace std; void rabbit::decide(int *dx, int *dy) const { //The values of *dx and *dy are either -1, 0, or 1. *dx = rand() % 3 - 1; *dy = rand() % 3 - 1; }