Subscribe to our newsletterWe’ll send you our favorite blog posts, tutorials, events, and more!
In this project, Juni Instructor Maya will be showing us how to build a Maze Runner.
Read through the project instructions and steps, to try and figure out how to code this project on your own. If you get stuck or need help, watch Maya's video tutorial or view her solution code below!
Who is this for?
- Language: Java
- Juni Level: Java Level 1
- Ages: 12-18
- Coding Experience: Familiar with basic Java syntax and concepts.
This project will help us learn how to create, fill, and access elements in 2D arrays. It will also help us practice core concepts like while loops, functions, and conditionals!
- Core concepts: Taking in user input, While loops, 2D arrays, Conditionals
- Lines of Code: ~50-75 blocks
- Difficulty: Moderate
- Est. Time: ~20-45 min, but this varies by student and how creative you get!
First watch Maya run her finished version of her Maze Runner, to better understand what we are trying to create in this project. We've covered the solution code in the demo, so that you can challenge yourself first.
Ask the user for a width, a height, and a simple maze with those dimensions. The maze will be represented as a grid of characters, where
* represents walls,
I is the start of the maze, and
O is the end!
Here are some example inputs and their respective solutions:
Try to do the project on your own first, and get creative with it! If you get stuck or want to check your code, check out Maya’s solution and tutorial video below.
Project Solution & Tutorial
Check your answers or get help by viewing Maya's solution and tutorial video:
Want to keep learning?
We hope you enjoyed Maya's project tutorial!
To keep practicing and learning, please check out all of our coding tutorials on our blog.
Looking up your coding questions is one of the best ways to learn!
Another great way to learn is from an experienced coder or instructor. Juni CS instructors like Maya work closely with students ages 8-18, and are specially trained to adapt to each child's unique learning style, pace, and interests.
Read more about our coding courses and curriculum, or get started with our Admissions Team to learn which course is best for your child’s coding journey. You can also read more about how we use Scratch to teach coding.