//Excerpt from game.C, showing the body of the function game::play. for (;; term.wait(250)) { for (master_t::const_iterator it = master.begin(); it != master.end();) { wabbit *const p = *it; const bool alive = p->move(); ++it; if (!alive) { //The wabbit that moved in line 8 blundered into //another wabbit and was eaten. delete p; } //Change lines 19-27 to fit your game. if (count('r') <= 0) { term.put(0, 0, "No more rabbits."); return; } if (count('W') <= 0) { term.put(0, 0, "No more wolves."); return; } } }