shared_ptr<Action> Player::playFreeKick() { TTeamIndex ti = WM.getOurTeamIndex(); TPlayMode pm = WM.getPlayMode(); if ((TI_LEFT == ti && PM_FREE_KICK_LEFT == pm) || (TI_RIGHT == ti && PM_FREE_KICK_RIGHT == pm)) { return playOurFreeKick(); } else { return playOppFreeKick(); } }
void Player::playFreeKick() { ETeamSide ts = WorldModel::instance().getTeamSide(); EPlayMode pm = WorldModel::instance().getPlayMode(); if ( ( TS_LEFT == ts && PM_FREE_KICK_LEFT == pm ) || ( TS_RIGHT == ts && PM_FREE_KICK_RIGHT == pm ) ) { return playOurFreeKick(); } else { return playOppFreeKick(); } }