OPTIMAL FORAGING AMONG COMPETITORS AND PREDATORS: A STATE-DEPENDENT MODEL INCORPORATING GAME THEORY