When should I be aggressive? A state-dependent foraging game between competitors