refactor: unit.id < 0 or unit.id > 0 to isPlayer()