std::vector<std::pair<int, int> > Board::checkOpponent(int x, int y, std::pair<int, int> key) { std::vector<std::pair<int, int> > capturedPawns; std::pair<int, int> key2 = std::make_pair(x, y); Pawn *tmpPawn; if ((tmpPawn = findPawn(x, y)) != NULL) { if (tmpPawn->getPlayer()->getName() != _pawns[key]->getPlayer()->getName()) return (checkTrap(key, key2)); } return capturedPawns; }
OdeIntRKStrategy(double tin, double dt, boost::shared_ptr<Force> kin, boost::shared_ptr<Force> pot, double eps_abs, double eps_rel, bool observe, double tCheck=0, checkTrap dCheck = checkTrap(false)): tin_(tin), dt_(dt), tCheck_(tCheck), kin_(kin), pot_(pot), eps_abs_(eps_abs), eps_rel_(eps_rel), observe_(observe), dCheck_(checkTrap(dCheck)){};
OdeIntSympStrategy(double tin, double dt, boost::shared_ptr<Force> kin, boost::shared_ptr<Force> pot, boost::shared_ptr<Field> dpot = boost::shared_ptr<Field>(), double tCheck=0, checkTrap dCheck = checkTrap(false)): tin_(tin), dt_(dt), tCheck_(tCheck), kin_(kin), pot_(pot), dpot_(dpot), dCheck_(checkTrap(dCheck)){};