Deliverables
Build your Maze
For this exercise, you will build your hedge maze. You’ll do this entirely in emoji. Here is the breakdown:
- Hedges - green square (🟩).
- Path - yellow square (🟨).
- Player - rabbit (🐰)
- End - carrot (🥕)
- Up arrow - (⬆️)
- Down arrow - (⬇️)
- Left arrow - (⬅️)
- Right arrow - (➡️)
Your goal is to build out the entire maze so it looks like the following:
The red lines indicate the necessary Spacer() views. Here is some skeleton code to get you started:
var body: some View {
Spacer()
// Maze goes here
Spacer()
// Buttons go here
Spacer()
}
For the buttons, use a plain old Text(). You’ll convert them to buttons soon enough.