vector wabbit::move(int dx, int dy) { vector doomed; //pointers to the wabbit's who died during this move if (dx and dy are both zero, or !t->in_range(x, y, dx, dy)) { return doomed; } construct other, newx, newy, other, I_ate_him, and he_ate_me; if (!other || I_ate_him && !he_ate_me) { t->put(x, y); x = newx; y = newy; t->put(x, y, c); } if (he_ate_me) { doomed.push_back(this); } if (I_ate_him) { doomed.push_back(other); } return doomed; }