On a model of competition in periodic environments