jawira/nice-maze-generator

Create a maze using ascii art

Maintainers

👁 jawira

Package info

gitlab.com/jawira/nice-maze-generator

Issues

pkg:composer/jawira/nice-maze-generator

Statistics

Installs: 17

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2020-11-08 22:27 UTC

Requires

  • php: >=8.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT acf81d847d4e5552759edb1528e42483d25bd12b

  • Jawira Portugal <dev.woop@tugal.be>

This package is not auto-updated.

Last update: 2026-06-16 00:51:29 UTC


README

Create a maze using ascii art.

👁 Latest Stable Version
👁 .gitattributes
👁 composer.lock
👁 License

Usage

Use maze() function to create an array containing the maze.

<?php
// demo.php
require __DIR__ . '/vendor/autoload.php';

use function Jawira\NiceMazeGenerator\maze;
use function Jawira\NiceMazeGenerator\maze_to_string;

$arrayMaze = maze(5, 20); // 5 rows, 20 columns
$stringMaze = maze_to_string($arrayMaze);

echo $stringMaze;

This is the output from previous code:

╭─────────────┬───────┬───┬───┬───────┬─╮
│ │ │ │ │ │ │
│ ╭─────┬─╴ ╷ ├─╴ ╭─╴ │ ╷ │ ╷ │ ╶─╮ ╷ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ ╭───╯ ╭─╯ │ ╭─┴─╮ ╵ │ ╵ │ ╰─╮ │ ╰─╯ │
│ │ │ │ │ │ │ │ │ │ │ │
│ ╵ │ ╶───┴─╮ ╵ │ ╷ ├───┴───┴─┬─╯ ├───┬─┤
│ │ │ │ │ │ │ │ │ │
├─╴ ╰─────╮ ╰───╯ │ ╵ ╶─────╮ ╵ ╶─╯ ╷ ╵ │
│ │ │ │ │ │
╰─────────┴───────┴─────────┴───────┴───╯

How to install

$ composer require jawira/nice-maze-generator

Contributing

  • If you liked this project, ⭐ star it on GitLab.
  • Issues are welcomed.

License

This library is licensed under the MIT license.