Overview

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In your last homework assignment, you created the skeleton of a maze app. This app displayed a maze with arrows meant to move the player. The next step is to improve the look-and-feel of the interface, as well as add some interactivity.

If you want to match the sample code, here is the completed code from the last homework:

  struct ContentView: View {

    var body: some View {
      	Spacer()
      	VStack {
          	Text("🟩🟩🟩🟩🟩🟩🟩🐰🟩🟩🟩🟩🟩🟩🟩🟩")
          	Text("🟩🟧🟧🟧🟧🟧🟧🟧🟩🟧🟧🟧🟧🟧🟧🟩")
          	Text("🟩🟩🟩🟩🟩🟩🟩🟧🟩🟩🟩🟩🟩🟩🟧🟩")
          	Text("🟩🟧🟧🟧🟧🟧🟩🟧🟧🟧🟧🟧🟧🟧🟧🟩")
          	Text("🟩🟧🟩🟩🟩🟧🟩🟩🟩🟩🟩🟩🟩🟩🟧🟩")
          	Text("🟩🟩🟩🟩🟩🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟩")
          	Text("🟩🟧🟧🟧🟧🟧🟩🟩🟩🟩🟧🟩🟧🟩🟧🟩")
          	Text("🟩🟧🟩🟩🟩🟧🟩🟧🟧🟧🟧🟩🟧🟩🟧🟩")
          	Text("🟩🟧🟧🟧🟩🟧🟩🟩🟩🟩🟩🟩🟩🟩🟧🟩")
          	Text("🟩🟩🟩🟧🟩🟩🟩🟩🟩🟩🟩🟧🟧🟧🟧🟩")
          	Text("🟩🟩🟩🥕🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩")
      	}

      	Spacer()
      	HStack {
          	Text("⬆️")
          	Text("⬇️")
          	Text("⬅️")
          	Text("➡️")
      	}
      	Spacer()
    }
  }
See forum comments
Download course materials from Github
Previous: Quiz: Adding Interactivity Next: Deliverables