bool MatchHelpers::attacksUp(const Team& t) { auto mh = t.getMatch()->getMatchHalf(); if(mh == MatchHalf::PenaltyShootout) { return t.isFirst() == t.getMatch()->getPenaltyShootout().firstTeamKicksNext(); } return t.isFirst() == (mh <= MatchHalf::FirstHalf || (mh <= MatchHalf::ExtraTimeFirstHalf && mh >= MatchHalf::FullTimePauseEnd)); }