jawira/nice-maze-generator
Composer 安装命令:
composer require jawira/nice-maze-generator
包简介
Create a maze using ascii art
README 文档
README
Create a maze using ascii art.
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.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-07