I have the random sample $X_1, X_2, \dots, X_n$ drawn from the uniform distribution on $[\varphi, \varphi + 1]$. To test the null hypothesis $H_0 : \varphi = 0$ against the alternative hypothesis $H_1 : \varphi > 0$, we have the test
$$\text{Reject} \ H_0 \ \ \ \text{if} \ \ \ X_{(n)} \ge 1 \ \text{or} \ X_{(1)} \ge g,$$
where $g$ is a constant, $X_{(1)} = \min\{X_1, X_2, \dots, X_n\}, X_{(n)} = \max\{X_1, X_2, \dots, X_n\}$.
How do I find $n$ and $g$ so that the $0.05$ level will have power at least $0.8$ if $\varphi > 0.1$?
I think we have to begin by finding the CDF of $X_{(1)}$ and $X_{(n)}$, but I've only just started learning this stuff, so I really don't know what I'm supposed to do. I would appreciate it if any answers would please explain the reasoning behind the steps, so that I may better understand.