Used TEAM_RES and TEAM_ENL constants, rather than magic numbers.