Skip to content

Mazy Mice #2312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Description

Meet Mickey and Minerva, two clever mice who love to navigate their way through a maze to find cheese. They enjoy a good challenge, but with only their tiny mouse brains, they prefer if there is only one correct path to the cheese.

## Instructions
# Instructions

Your task is to generate the perfect mazes for Mickey and Minerva — those with only one solution and no isolated sections.
Here's what you need to know:
Expand All @@ -12,11 +8,10 @@
- The program should accept two parameters: rows and columns. The maze should be between 5 and 100 cells in size.
- A maze which is `x` columns wide and `y` rows high should be `2x + 1` characters wide and `2y + 1` characters high.
- If no seed is provided, generate a random maze. If the same seed is provided multiple times, the resulting maze should be the same each time.
- Use [box-drawing][box-drawing] characters to draw walls, and an arrow symbol (⇨) for the entrance on the left and exit on the right.

It's time to create some perfect mazes for these adventurous mice!

### Examples
## Examples

The small square maze 5x5 cells (or 11x11 characters)

Expand Down Expand Up @@ -58,20 +53,5 @@

You can use any algorithm to generate a perfect maze. The [recursive backtracker][recursive-backtracker] is a good choice.

### Box drawing characters

| Character | Name | Unicode |
| :-------: | :------------------------------------- | :------ |
| ┌ | box drawings light down and right | U+250C |
| ─ | box drawings light horizontal | U+2500 |
| ┬ | box drawings light down and horizontal | U+252C |
| ┐ | box drawings light down and left | U+2510 |
| │ | box drawings light vertical | U+2502 |
| └ | box drawings light up and right | U+2514 |
| ┴ | box drawings light up and horizontal | U+2534 |
| ┘ | box drawings light up and left | U+2518 |
| ├ | box drawings light vertical and right | U+2520 |
| ⇨ | rightwards white arrow | U+21E8 |

[recursive-backtracker]: https://en.wikipedia.org/wiki/Maze_generation_algorithm
[box-drawing]: https://en.wikipedia.org/wiki/Box-drawing_character

Check failure on line 57 in exercises/mazy-mice/instructions.md

View workflow job for this annotation

GitHub Actions / Lint markdown files

Link and image reference definitions should be needed

exercises/mazy-mice/instructions.md:57:1 MD053/link-image-reference-definitions Link and image reference definitions should be needed [Unused link or image reference definition: "box-drawing"] [Context: "[box-drawing]: https://en.wiki..."] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md
3 changes: 3 additions & 0 deletions exercises/mazy-mice/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

Meet Mickey and Minerva, two clever mice who love to navigate their way through a maze to find cheese. They enjoy a good challenge, but with only their tiny mouse brains, they prefer if there is only one correct path to the cheese.
Loading