C++3D迷宫

ops/2024/9/23 1:01:03/
x">
xmlns="http://www.w3.org/2000/svg" style="display: none;">z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">

目录

  • 开头
  • 程序
  • 程序的流程图
  • 程序游玩的效果
  • 下一篇博客要说的东西

开头

大家好,我叫这是我58。

程序

y">#yword">include <iostream>
yword">using yword">namespace std;
yword">void printmaze(yword">char strmaze[5][5][5]) {cout << "-----@" << endl;yword">int i = 0;yword">int ia = 0;yword">int ib = 0;yword">for (; i < 5; i++) {yword">for (ia = 0; ia < 5; ia++) {yword">for (ib = 0; ib < 5; ib++) {cout << "\033[" << ('G' == strmaze[i][ia][ib] ? "32;1" : "0") << "m" << strmaze[i][ia][ib] << "\033[0m";}cout << "|" << endl;}cout << "-----@" << endl;}
}
yword">int main() {yword">char strmaze[5][5][5] = {'P','*',' ','*','*','*',' ',' ',' ','*',' ',' ','*',' ',' ',' ','*','*','*',' ',' ',' ','*',' ',' ',' ',' ','*',' ',' ',' ','*',' ','*',' ','*','*','*','*','*',' ',' ','*',' ',' ',' ',' ','*',' ',' ','*',' ',' ','*',' ','*',' ','*',' ',' ',' ','*',' ','*','*',' ',' ','*',' ',' ',' ',' ','*',' ',' ','*','*',' ',' ',' ',' ',' ','*','*',' ',' ',' ','*',' ','*',' ',' ','*',' ',' ',' ',' ','*','*',' ','*','*',' ',' ',' ','*',' ',' ',' ',' ',' ','*','*',' ','*',' ',' ','*','*','*',' ','*',' ',' ','G',};yword">char* cp = &strmaze[0][0][0];yword">char ch = 0;cout << "欢迎你来玩这个3D迷宫&#xff0c;在这个迷宫中&#xff0c;“P”是你&#xff0c;“*”是墙&#xff0c;空格是你可以走的地方&#xff0c;而\033[32;1m“G”\033[0m是\033[32;1m终点\033[0m&#xff0c;走到这就能让你胜利了&#xff0c;并且&#xff0c;按“w”能使你往上移&#xff0c;按“a”能使你往左移&#xff0c;按“s”能使你往下移&#xff0c;按“d”能使你往右移&#xff0c;按“q”能使你上一层&#xff0c;按“e”能使你下一层。这就是这迷宫的规则&#xff0c;你听明白了吗?" << endl << endl;system("pause");system("cls");yword">while ('G' == strmaze[4][4][4]) {yword">int ix = (cp - &strmaze[0][0][0]) / 25;yword">int iy = (cp - &strmaze[0][0][0]) / 5 % 5;yword">int iz = (cp - &strmaze[0][0][0]) % 5;printmaze(strmaze);cin >> ch;rewind(stdin);*cp = ' ';yword">switch (ch) {yword">case 'w':iy && '*' != *(cp - 5) && (cp -= 5);yword">break;yword">case 'a':iz && '*' != *(cp - 1) && (cp--);yword">break;yword">case 's':4 != iy && '*' != *(cp + 5) && (cp += 5);yword">break;yword">case 'd':4 != iz && '*' != *(cp + 1) && (cp++);yword">break;yword">case 'q':ix && '*' != *(cp - 25) && (cp -= 25);yword">break;yword">case 'e':4 != ix && '*' != *(cp + 25) && (cp += 25);yword">break;yword">default:yword">break;}*cp = 'P';system("cls");}system("color 0A");cout << "恭喜你&#xff0c;你赢了" << endl;yword">return 0;
}

程序的流程图

zT052" width="379.71356201171875" xmlns="http://www.w3.org/2000/svg" height="254" viewbox="0.0000152587890625 0 379.71356201171875 254" class="mermaid-svg"> yle>#mermaid-svg-ZDWSwh6bt0LzT052 {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .error-icon{fill:#552222;}#mermaid-svg-ZDWSwh6bt0LzT052 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ZDWSwh6bt0LzT052 .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-ZDWSwh6bt0LzT052 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ZDWSwh6bt0LzT052 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ZDWSwh6bt0LzT052 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ZDWSwh6bt0LzT052 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ZDWSwh6bt0LzT052 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ZDWSwh6bt0LzT052 .marker.cross{stroke:#333333;}#mermaid-svg-ZDWSwh6bt0LzT052 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ZDWSwh6bt0LzT052 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .cluster-label text{fill:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .cluster-label span{color:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .label text,#mermaid-svg-ZDWSwh6bt0LzT052 span{fill:#333;color:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .node rect,#mermaid-svg-ZDWSwh6bt0LzT052 .node circle,#mermaid-svg-ZDWSwh6bt0LzT052 .node ellipse,#mermaid-svg-ZDWSwh6bt0LzT052 .node polygon,#mermaid-svg-ZDWSwh6bt0LzT052 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ZDWSwh6bt0LzT052 .node .label{text-align:center;}#mermaid-svg-ZDWSwh6bt0LzT052 .node.clickable{cursor:pointer;}#mermaid-svg-ZDWSwh6bt0LzT052 .arrowheadPath{fill:#333333;}#mermaid-svg-ZDWSwh6bt0LzT052 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ZDWSwh6bt0LzT052 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ZDWSwh6bt0LzT052 .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-ZDWSwh6bt0LzT052 .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-ZDWSwh6bt0LzT052 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ZDWSwh6bt0LzT052 .cluster text{fill:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 .cluster span{color:#333;}#mermaid-svg-ZDWSwh6bt0LzT052 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ZDWSwh6bt0LzT052 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}yle> yle="opacity: 1;"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-b-c"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;"> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;"> x="23" ry="23" x="-31.75" y="-23" width="63.5" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">开始
yle="opacity: 1;" id="flowchart-b-159" transform="translate(189.85678100585938,127)"> ygon points="-15.333333333333334,0 140.38020833333334,0 163.38020833333334,-46 7.666666666666667,-46" transform="translate(-74.0234375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义pritmaze函数
yle="opacity: 1;" id="flowchart-c-160" transform="translate(189.85678100585938,223)"> ygon points="-15.333333333333334,0 325.3802083333333,0 348.3802083333333,-46 7.666666666666667,-46" transform="translate(-166.5234375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">把三维字符数组strmaze初始化为下面的图片

xmlns="http://www.w3.org/2000/svg" height="3126.776611328125" viewbox="0 0 3324.8623046875 3126.776611328125" class="mermaid-svg"> yle>#mermaid-svg-82a2OF0DduYoCIsC {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-82a2OF0DduYoCIsC .error-icon{fill:#552222;}#mermaid-svg-82a2OF0DduYoCIsC .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-82a2OF0DduYoCIsC .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-82a2OF0DduYoCIsC .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-82a2OF0DduYoCIsC .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-82a2OF0DduYoCIsC .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-82a2OF0DduYoCIsC .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-82a2OF0DduYoCIsC .marker{fill:#333333;stroke:#333333;}#mermaid-svg-82a2OF0DduYoCIsC .marker.cross{stroke:#333333;}#mermaid-svg-82a2OF0DduYoCIsC svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-82a2OF0DduYoCIsC .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-82a2OF0DduYoCIsC .cluster-label text{fill:#333;}#mermaid-svg-82a2OF0DduYoCIsC .cluster-label span{color:#333;}#mermaid-svg-82a2OF0DduYoCIsC .label text,#mermaid-svg-82a2OF0DduYoCIsC span{fill:#333;color:#333;}#mermaid-svg-82a2OF0DduYoCIsC .node rect,#mermaid-svg-82a2OF0DduYoCIsC .node circle,#mermaid-svg-82a2OF0DduYoCIsC .node ellipse,#mermaid-svg-82a2OF0DduYoCIsC .node polygon,#mermaid-svg-82a2OF0DduYoCIsC .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-82a2OF0DduYoCIsC .node .label{text-align:center;}#mermaid-svg-82a2OF0DduYoCIsC .node.clickable{cursor:pointer;}#mermaid-svg-82a2OF0DduYoCIsC .arrowheadPath{fill:#333333;}#mermaid-svg-82a2OF0DduYoCIsC .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-82a2OF0DduYoCIsC .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-82a2OF0DduYoCIsC .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-82a2OF0DduYoCIsC .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-82a2OF0DduYoCIsC .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-82a2OF0DduYoCIsC .cluster text{fill:#333;}#mermaid-svg-82a2OF0DduYoCIsC .cluster span{color:#333;}#mermaid-svg-82a2OF0DduYoCIsC div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-82a2OF0DduYoCIsC :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}yle> yle="opacity: 1;"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-b-c"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-c-d"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-d-e"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-e-f"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-f-g"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-g-h"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-h-i"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-i-ab"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-ab-清空缓冲区"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-清空缓冲区-把解引用的cp设为空格"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把解引用的cp设为空格-j"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-j-k"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-k-把cp向左移动5位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向左移动5位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-ttt-e"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-e-l"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-l-m"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> z" style="opacity: 1;" id="L-m-z"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-j-n"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-n-o"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-o-把cp向左移动一位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向左移动一位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-n-p"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-p-t"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-t-把cp向右移动5位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向右移动5位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-p-u"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-u-v"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-v-把cp向右移动一位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向右移动一位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-u-w"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x" style="opacity: 1;" id="L-w-x"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x LE-把cp向左移动25位" style="opacity: 1;" id="L-x-把cp向左移动25位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向左移动25位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> y" style="opacity: 1;" id="L-w-y"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> y LE-aa" style="opacity: 1;" id="L-y-aa"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-aa-把cp向右移动25位"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-把cp向右移动25位-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-k-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-o-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-t-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-v-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x LE-ttt" style="opacity: 1;" id="L-x-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;" id="L-aa-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> y LE-ttt" style="opacity: 1;" id="L-y-ttt"> yle="fill:none"> x="0 0 10 10" refx="9" refy="5" markerunits="strokeWidth" markerwidth="8" markerheight="6" orient="auto"> z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> yle="opacity: 1;"> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(2050.201030731201,354)"> x="0" ry="0" width="288" height="26">
yle="display: inline-block; white-space: nowrap;"> 等待用户按下任意一个键&#xff0c;按下后就清屏
yle="opacity: 1;" transform="translate(937.2296867370605,638.5328063964844)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(148.44921875,1982.8898391723633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(78.6171875,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(78.6171875,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(2231.201030731201,1407.9257736206055)"> x="0" ry="0" width="32" height="26">
yle="display: inline-block; white-space: nowrap;"> 清屏
yle="opacity: 1;" transform="translate(2050.201030731201,638.5328063964844)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform=""> x="0" ry="0" width="0" height="0">
yle="display: inline-block; white-space: nowrap;"> z" class="edgeLabel L-LS-m' L-LE-z">
yle="opacity: 1;" transform="translate(1078.7960929870605,1505.3187408447266)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(433.484375,2078.9328079223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(361.75,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(361.75,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(1220.3624992370605,1696.9546813964844)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(714.71484375,2174.9757766723633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(644.8828125,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(644.8828125,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(1361.9289054870605,1886.8468704223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(999.75,2271.0187454223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(928.015625,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(928.015625,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(1505.5929679870605,2078.9328079223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(1287.2734375,2366.977340698242)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;"> x" class="edgeLabel L-LS-w' L-LE-x">是
yle="opacity: 1;" transform="translate(1215.34375,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;"> x-把cp向左移动25位" class="edgeLabel L-LS-x' L-LE-把cp向左移动25位">是
yle="opacity: 1;" transform="translate(1215.34375,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(1649.4523429870605,2271.0187454223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;"> y" class="edgeLabel L-LS-w' L-LE-y">否
yle="opacity: 1;" transform="translate(1574.9921875,2462.935935974121)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;"> y-aa" class="edgeLabel L-LS-y' L-LE-aa">是
yle="opacity: 1;" transform="translate(1503.0625,2766.7765579223633)"> x="0" ry="0" width="16" height="26">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" transform="translate(1503.0625,2888.7765579223633)"> x="0" ry="0" width="40.34375" height="26">
yle="display: inline-block; white-space: nowrap;"> break
yle="opacity: 1;" transform="translate(218.28125,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> 否(break)
yle="opacity: 1;" transform="translate(505.21875,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> 否(break)
yle="opacity: 1;" transform="translate(784.546875,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> 否(break)
yle="opacity: 1;" transform="translate(1071.484375,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> 否(break)
yle="opacity: 1;" transform="translate(1359.203125,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> x-ttt" class="edgeLabel L-LS-x' L-LE-ttt">否(break)
yle="opacity: 1;" transform="translate(1646.921875,2827.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> 否(break)
yle="opacity: 1;" transform="translate(1748.4054679870605,2766.7765579223633)"> x="0" ry="0" width="68.09375" height="26">
yle="display: inline-block; white-space: nowrap;"> y-ttt" class="edgeLabel L-LS-y' L-LE-ttt">否(break)
yle="opacity: 1;"> x="0" ry="0" x="-10" y="-10" width="20" height="20" class="label-container" style="stroke:#fff;fill:#fff;">
yle="display: inline-block; white-space: nowrap;">
yle="opacity: 1;" id="flowchart-b-216" transform="translate(2050.201030731201,101)"> ygon points="-15.333333333333334,0 463.3958333333333,0 486.3958333333333,-46 7.666666666666667,-46" transform="translate(-235.53125,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义字符指针cp为三维字符数组strmaze第0层第0行第0列的地址
yle="opacity: 1;" id="flowchart-c-217" transform="translate(2050.201030731201,197)"> ygon points="-15.333333333333334,0 117.39583333333333,0 140.39583333333334,-46 7.666666666666667,-46" transform="translate(-62.53125,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义字符ch为0
yle="opacity: 1;" id="flowchart-d-218" transform="translate(2050.201030731201,293)"> ygon points="-15.333333333333334,0 2494.9895833333335,0 2517.9895833333335,-46 7.666666666666667,-46" transform="translate(-1251.328125,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">输出“欢迎你来玩这个3D迷宫&#xff0c;在这个迷宫中&#xff0c;“P”是你&#xff0c;“*”是墙&#xff0c;空格是你可以走的地方&#xff0c;而\​033[32;1m“G”\​033[0m是\​033[32;1m终点\​033[0m&#xff0c;走到这就能让你胜利了&#xff0c;并且&#xff0c;按“w”能使你往上移&#xff0c;按“a”能使你往左移&#xff0c;按“s”能使你往下移&#xff0c;按“d”能使你往右移&#xff0c;按“q”能使你上一层&#xff0c;按“e”能使你下一层。这就是这迷宫的规则&#xff0c;你听明白了吗?\​n\​n”
yle="opacity: 1;" id="flowchart-e-219" transform="translate(2050.201030731201,496.2664031982422)"> ygon points="104.26640625,0 208.5328125,-104.26640625 104.26640625,-208.5328125 0,-104.26640625" transform="translate(-104.26640625,104.26640625)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'G' == strmaze[4][4][4]?
yle="opacity: 1;" id="flowchart-f-220" transform="translate(937.2296867370605,699.5328063964844)"> ygon points="-15.333333333333334,0 668.7552083333334,0 691.7552083333334,-46 7.666666666666667,-46" transform="translate(-338.2109375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义整型ix为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数除以25的结果
yle="opacity: 1;" id="flowchart-g-221" transform="translate(937.2296867370605,795.5328063964844)"> ygon points="-15.333333333333334,0 684.6302083333334,0 707.6302083333334,-46 7.666666666666667,-46" transform="translate(-346.1484375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义整型iy为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数除以5模5的结果
yle="opacity: 1;" id="flowchart-h-222" transform="translate(937.2296867370605,891.5328063964844)"> ygon points="-15.333333333333334,0 644.2395833333334,0 667.2395833333334,-46 7.666666666666667,-46" transform="translate(-325.953125,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">定义整型iy为cp与三维字符数组strmaze第0层第0行第0列的地址之间的元素个数模5的结果
yle="opacity: 1;" id="flowchart-i-223" transform="translate(937.2296867370605,987.5328063964844)"> x="0" ry="0" x="-182.546875" y="-23" width="365.09375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">执行pritmaze函数&#xff0c;参数有三维字符数组strmaze
yle="opacity: 1;" id="flowchart-ab-224" transform="translate(937.2296867370605,1083.5328063964844)"> ygon points="-15.333333333333334,0 173.00520833333334,0 196.00520833333334,-46 7.666666666666667,-46" transform="translate(-90.3359375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">把ch设为你输入的字符
yle="opacity: 1;" id="flowchart-清空缓冲区-225" transform="translate(937.2296867370605,1179.5328063964844)"> x="0" ry="0" x="-50" y="-23" width="100" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">清空缓冲区
yle="opacity: 1;" id="flowchart-把解引用的cp设为空格-226" transform="translate(937.2296867370605,1275.5328063964844)"> x="0" ry="0" x="-90.421875" y="-23" width="180.84375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把解引用的cp设为空格
yle="opacity: 1;" id="flowchart-j-227" transform="translate(937.2296867370605,1407.9257736206055)"> ygon points="59.39296875,0 118.7859375,-59.39296875 59.39296875,-118.7859375 0,-59.39296875" transform="translate(-59.39296875,59.39296875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'w' == ch?
yle="opacity: 1;" id="flowchart-k-228" transform="translate(148.44921875,2614.856246948242)"> ygon points="94.42265625,0 188.8453125,-94.42265625 94.42265625,-188.8453125 0,-94.42265625" transform="translate(-94.42265625,94.42265625)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">iy && '*' != *(cp - 5)?
yle="opacity: 1;" id="flowchart-把cp向左移动5位-229" transform="translate(78.6171875,2827.7765579223633)"> x="0" ry="0" x="-70.6171875" y="-23" width="141.234375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向左移动5位
yle="opacity: 1;" id="flowchart-ttt-230" transform="translate(999.75,2949.7765579223633)"> x="0" ry="0" x="-103.2734375" y="-23" width="206.546875" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把解引用的cp设为字符“P”
yle="opacity: 1;" id="flowchart-l-232" transform="translate(2050.201030731201,699.5328063964844)"> x="0" ry="0" x="-146" y="-23" width="292" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把背景色设为黑色&#xff0c;前景色设为淡绿色
yle="opacity: 1;" id="flowchart-m-233" transform="translate(2050.201030731201,795.5328063964844)"> ygon points="-15.333333333333334,0 187.55208333333334,0 210.55208333333334,-46 7.666666666666667,-46" transform="translate(-97.609375,23)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">输出“恭喜你&#xff0c;你赢了\​n”
yle="opacity: 1;" id="flowchart-z-234" transform="translate(2050.201030731201,3095.7765579223633)"> x="23" ry="23" x="-31.75" y="-23" width="63.5" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">结束
yle="opacity: 1;" id="flowchart-n-236" transform="translate(1078.7960929870605,1601.1367111206055)"> ygon points="57.81796875,0 115.6359375,-57.81796875 57.81796875,-115.6359375 0,-57.81796875" transform="translate(-57.81796875,57.81796875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'a' == ch?
yle="opacity: 1;" id="flowchart-o-237" transform="translate(433.484375,2614.856246948242)"> ygon points="94.2890625,0 188.578125,-94.2890625 94.2890625,-188.578125 0,-94.2890625" transform="translate(-94.2890625,94.2890625)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">iz && '*' != *(cp - 1)?
yle="opacity: 1;" id="flowchart-把cp向左移动一位-238" transform="translate(361.75,2827.7765579223633)"> x="0" ry="0" x="-74.421875" y="-23" width="148.84375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向左移动一位
yle="opacity: 1;" id="flowchart-p-241" transform="translate(1220.3624992370605,1791.9007759094238)"> ygon points="56.94609375,0 113.8921875,-56.94609375 56.94609375,-113.8921875 0,-56.94609375" transform="translate(-56.94609375,56.94609375)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'s' == ch?
yle="opacity: 1;" id="flowchart-t-242" transform="translate(714.71484375,2614.856246948242)"> ygon points="110.08828125000001,0 220.17656250000002,-110.08828125000001 110.08828125000001,-220.17656250000002 0,-110.08828125000001" transform="translate(-110.08828125000001,110.08828125000001)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">4 != iy && '*' != *(cp + 5)?
yle="opacity: 1;" id="flowchart-把cp向右移动5位-243" transform="translate(644.8828125,2827.7765579223633)"> x="0" ry="0" x="-70.6171875" y="-23" width="141.234375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向右移动5位
yle="opacity: 1;" id="flowchart-u-246" transform="translate(1361.9289054870605,1982.8898391723633)"> ygon points="58.04296875,0 116.0859375,-58.04296875 58.04296875,-116.0859375 0,-58.04296875" transform="translate(-58.04296875,58.04296875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'d' == ch?
yle="opacity: 1;" id="flowchart-v-247" transform="translate(999.75,2614.856246948242)"> ygon points="109.9546875,0 219.909375,-109.9546875 109.9546875,-219.909375 0,-109.9546875" transform="translate(-109.9546875,109.9546875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">4 != iz && '*' != *(cp + 1)?
yle="opacity: 1;" id="flowchart-把cp向右移动一位-248" transform="translate(928.015625,2827.7765579223633)"> x="0" ry="0" x="-74.421875" y="-23" width="148.84375" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向右移动一位
yle="opacity: 1;" id="flowchart-w-251" transform="translate(1505.5929679870605,2174.9757766723633)"> ygon points="58.04296875,0 116.0859375,-58.04296875 58.04296875,-116.0859375 0,-58.04296875" transform="translate(-58.04296875,58.04296875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'q' == ch?
yle="opacity: 1;" id="flowchart-x-252" transform="translate(1287.2734375,2614.856246948242)"> ygon points="98.2546875,0 196.509375,-98.2546875 98.2546875,-196.509375 0,-98.2546875" transform="translate(-98.2546875,98.2546875)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">ix && '*' != *(cp - 25)?
yle="opacity: 1;" id="flowchart-把cp向左移动25位-253" transform="translate(1215.34375,2827.7765579223633)"> x="0" ry="0" x="-74.8125" y="-23" width="149.625" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向左移动25位
yle="opacity: 1;" id="flowchart-y-256" transform="translate(1649.4523429870605,2366.977340698242)"> ygon points="57.95859375,0 115.9171875,-57.95859375 57.95859375,-115.9171875 0,-57.95859375" transform="translate(-57.95859375,57.95859375)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">'e' == ch?
yle="opacity: 1;" id="flowchart-aa-257" transform="translate(1574.9921875,2614.856246948242)"> ygon points="113.92031250000001,0 227.84062500000002,-113.92031250000001 113.92031250000001,-227.84062500000002 0,-113.92031250000001" transform="translate(-113.92031250000001,113.92031250000001)" class="label-container">ygon>
yle="display: inline-block; white-space: nowrap;">4 != ix && '*' != *(cp + 25)?
yle="opacity: 1;" id="flowchart-把cp向右移动25位-258" transform="translate(1503.0625,2827.7765579223633)"> x="0" ry="0" x="-74.8125" y="-23" width="149.625" height="46" class="label-container">
yle="display: inline-block; white-space: nowrap;">把cp向右移动25位
xmlns="http://www.w3.org/2000/svg" height="1499.90625" viewbox="0 0 2153.52587890625 1499.90625" class="mermaid-svg"> yle>#mermaid-svg-98OXZaimn6KPKFBA {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-98OXZaimn6KPKFBA .error-icon{fill:#552222;}#mermaid-svg-98OXZaimn6KPKFBA .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-98OXZaimn6KPKFBA .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-98OXZaimn6KPKFBA .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-98OXZaimn6KPKFBA .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-98OXZaimn6KPKFBA .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-98OXZaimn6KPKFBA .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-98OXZaimn6KPKFBA .marker{fill:#333333;stroke:#333333;}#mermaid-svg-98OXZaimn6KPKFBA .marker.cross{stroke:#333333;}#mermaid-svg-98OXZaimn6KPKFBA svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-98OXZaimn6KPKFBA .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-98OXZaimn6KPKFBA .cluster-label text{fill:#333;}#mermaid-svg-98OXZaimn6KPKFBA .cluster-label span{color:#333;}#mermaid-svg-98OXZaimn6KPKFBA .label text,#mermaid-svg-98OXZaimn6KPKFBA span{fill:#333;color:#333;}#mermaid-svg-98OXZaimn6KPKFBA .node rect,#mermaid-svg-98OXZaimn6KPKFBA .node circle,#mermaid-svg-98OXZaimn6KPKFBA .node ellipse,#mermaid-svg-98OXZaimn6KPKFBA .node polygon,#mermaid-svg-98OXZaimn6KPKFBA .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-98OXZaimn6KPKFBA .node .label{text-align:center;}#mermaid-svg-98OXZaimn6KPKFBA .node.clickable{cursor:pointer;}#mermaid-svg-98OXZaimn6KPKFBA .arrowheadPath{fill:#333333;}#mermaid-svg-98OXZaimn6KPKFBA .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-98OXZaimn6KPKFBA .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-98OXZaimn6KPKFBA .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-98OXZaimn6KPKFBA .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-98OXZaimn6KPKFBA .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-98OXZaimn6KPKFBA .cluster text{fill:#333;}#mermaid-svg-98OXZaimn6KPKFBA .cluster span{color:#333;}#mermaid-svg-98OXZaimn6KPKFBA div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-98OXZaimn6KPKFBA :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}yle> x="0 0 10 10" refx="9" refy="5" markerunits="userSpaceOnUse" markerwidth="12" markerheight="12" orient="auto"> z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x="0 0 10 10" refx="0" refy="5" markerunits="userSpaceOnUse" markerwidth="12" markerheight="12" orient="auto"> z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x="0 0 10 10" refx="11" refy="5" markerunits="userSpaceOnUse" markerwidth="11" markerheight="11" orient="auto"> x="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x="0 0 10 10" refx="-1" refy="5" markerunits="userSpaceOnUse" markerwidth="11" markerheight="11" orient="auto"> x="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"> x="0 0 11 11" refx="12" refy="5.2" markerunits="userSpaceOnUse" markerwidth="11" markerheight="11" orient="auto"> yle="stroke-width: 2; stroke-dasharray: 1, 0;"> x="0 0 11 11" refx="-1" refy="5.2" markerunits="userSpaceOnUse" markerwidth="11" markerheight="11" orient="auto"> yle="stroke-width: 2; stroke-dasharray: 1, 0;"> ze函数"> yle="" rx="0" ry="0" x="8" y="8" width="2137.52596282959" height="1483.90625">
yle="display: inline-block; white-space: nowrap;"> printmaze函数
yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> yle="fill:none;" marker-end="url(#flowchart-pointEnd)"> z-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-f LE-z" style="fill:none;" marker-end="url(#flowchart-pointEnd)">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
yle="display: inline-block; white-space: nowrap;">
z-308" transform="translate(2081.90096282959, 1446.40625)"> yle="" rx="20.5" ry="20.5" x="-28.625" y="-20.5" width="57.25" height="41"> yle="" transform="translate(-16, -13)">
yle="display: inline-block; white-space: nowrap;"> 结束
yle="" rx="20.5" ry="20.5" x="-28.625" y="-20.5" width="57.25" height="41"> yle="" transform="translate(-16, -13)">
yle="display: inline-block; white-space: nowrap;"> 开始
ygon points="-13.666666666666666,0 113.08854166666667,0 133.58854166666666,-41 6.833333333333333,-41" class="label-container" transform="translate(-59.9609375,20.5)" style="">ygon> yle="" transform="translate(-52.4609375, -13)">
yle="display: inline-block; white-space: nowrap;"> 输出“-----@\​n”
ygon points="-13.666666666666666,0 101.11979166666667,0 121.61979166666667,-41 6.833333333333333,-41" class="label-container" transform="translate(-53.9765625,20.5)" style="">ygon> yle="" transform="translate(-46.4765625, -13)">
yle="display: inline-block; white-space: nowrap;"> 定义整型i为0
ygon points="-13.666666666666666,0 109.52604166666667,0 130.02604166666666,-41 6.833333333333333,-41" class="label-container" transform="translate(-58.1796875,20.5)" style="">ygon> yle="" transform="translate(-50.6796875, -13)">
yle="display: inline-block; white-space: nowrap;"> 定义整型ia为0
ygon points="-13.666666666666666,0 110.04166666666667,0 130.54166666666666,-41 6.833333333333333,-41" class="label-container" transform="translate(-58.4375,20.5)" style="">ygon> yle="" transform="translate(-50.9375, -13)">
yle="display: inline-block; white-space: nowrap;"> 定义整型ib为0
ygon points="46.4296875,0 92.859375,-46.4296875 46.4296875,-92.859375 0,-46.4296875" class="label-container" transform="translate(-46.4296875,46.4296875)" style="">ygon> yle="" transform="translate(-18.4296875, -13)">
yle="display: inline-block; white-space: nowrap;"> i < 5?
yle="" rx="0" ry="0" x="-34.1796875" y="-20.5" width="68.359375" height="41"> yle="" transform="translate(-26.6796875, -13)">
yle="display: inline-block; white-space: nowrap;"> 设ia为0
ygon points="50.6328125,0 101.265625,-50.6328125 50.6328125,-101.265625 0,-50.6328125" class="label-container" transform="translate(-50.6328125,50.6328125)" style="">ygon> yle="" transform="translate(-22.6328125, -13)">
yle="display: inline-block; white-space: nowrap;"> ia < 5?
yle="" rx="0" ry="0" x="-34.4375" y="-20.5" width="68.875" height="41"> yle="" transform="translate(-26.9375, -13)">
yle="display: inline-block; white-space: nowrap;"> 设ib为0
ygon points="50.890625,0 101.78125,-50.890625 50.890625,-101.78125 0,-50.890625" class="label-container" transform="translate(-50.890625,50.890625)" style="">ygon> yle="" transform="translate(-22.890625, -13)">
yle="display: inline-block; white-space: nowrap;"> ib < 5?
ygon points="-13.666666666666666,0 1663.3385416666667,0 1683.8385416666667,-41 6.833333333333333,-41" class="label-container" transform="translate(-835.0859375,20.5)" style="">ygon> yle="" transform="translate(-827.5859375, -13)">
yle="display: inline-block; white-space: nowrap;"> 如果字符“G”为三维字符数组strmaze第i层第ia行第ib列的元素&#xff0c;那么就输出“\​033[32;1m”&#xff0c;三维字符数组strmaze第i层第ia行第ib列的元素和“\​033[0m”&#xff0c;否则输出“\​033[0m”&#xff0c;三维字符数组strmaze第i层第ia行第ib列的元素和“\​033[0m”
yle="" rx="0" ry="0" x="-34.4375" y="-20.5" width="68.875" height="41"> yle="" transform="translate(-26.9375, -13)">
yle="display: inline-block; white-space: nowrap;"> ib自增1
ygon points="-13.666666666666666,0 79.77604166666667,0 100.27604166666667,-41 6.833333333333333,-41" class="label-container" transform="translate(-43.3046875,20.5)" style="">ygon> yle="" transform="translate(-35.8046875, -13)">
yle="display: inline-block; white-space: nowrap;"> 输出“|\​n”
yle="" rx="0" ry="0" x="-34.1796875" y="-20.5" width="68.359375" height="41"> yle="" transform="translate(-26.6796875, -13)">
yle="display: inline-block; white-space: nowrap;"> ia自增1
ygon points="-13.666666666666666,0 113.08854166666667,0 133.58854166666666,-41 6.833333333333333,-41" class="label-container" transform="translate(-59.9609375,20.5)" style="">ygon> yle="" transform="translate(-52.4609375, -13)">
yle="display: inline-block; white-space: nowrap;"> 输出“-----@\​n”
yle="" rx="0" ry="0" x="-29.9765625" y="-20.5" width="59.953125" height="41"> yle="" transform="translate(-22.4765625, -13)">
yle="display: inline-block; white-space: nowrap;"> i自增1

程序游玩的效果

x">

3D迷宫

下一篇博客要说的东西

C++掉血迷宫


http://www.ppmy.cn/ops/111759.html

相关文章

【Redis】Redis 典型应用 - 分布式锁原理与实现

目录 Redis 典型应⽤ - 分布式锁什么是分布式锁分布式锁的基础实现引⼊过期时间引⼊校验 id引⼊ lua引⼊ watch dog (看⻔狗)引⼊ Redlock 算法其他功能 Redis 典型应⽤ - 分布式锁 什么是分布式锁 在⼀个分布式的系统中&#xff0c; 也会涉及到多个节点访问同⼀个公共资源的…

C++ 刷题笔记

1、最大组合数 给你 m个整数&#xff0c;你可以按照一定的顺序将他们首尾相连构成一个新的组合数字。请输出值最大的组合数字。 如整数1&#xff0c;23&#xff0c;组合起来有两种情况&#xff0c;123和231&#xff0c;因为231>123&#xff0c;所以231答案。 再比如&#x…

工厂模式(一):简单工厂模式

一、概念 顾名思义&#xff0c;带着工厂&#xff0c;两字肯定就是有标准、快速、统一等等一些工厂独有的特点。 那么什么是简单工厂模式呢&#xff1f; 定义&#xff1a;简单工厂模式是一种创建对象的设计模式&#xff0c;它定义了一个工厂类通过某个静态方法来生成不同类型的…

逻辑漏洞-其二(登录验证码安全)

2.登录验证码安全 验证码漏洞检测流程 2.1 图形验证码 无效验证 2.1.1 验证码可爆破 验证码可爆破&#xff0c;即验证码过于简单&#xff0c;例如验证码中字符数量过少&#xff0c;比如只有四位组成&#xff0c;且只包含 0-9 的数字还没有干扰点 &#xff0c;亦或者 验证码可以…

新装mysql8 并开启外网连接

1. 数据库安装 sudo apt-get update && sudo apt-get install mysql 2. 修改配置文件&#xff0c;允许外网ip访问 sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 注释掉bind-address这一行&#xff0c;将其修改为&#xff1a; # bind-address 127.0.0.1 bind-add…

安卓玩机工具-----无需root权限 卸载 禁用 删除当前机型app应用 ADB玩机工具

ADB玩机工具 ADB AppControl是很实用的安卓手机应用管理工具&#xff0c;无需root权限&#xff0c;通过usb连接电脑后&#xff0c;可以很方便的进行应用程序安装与卸载&#xff0c;还支持提取手机应用apk文件到电脑上&#xff0c;此外还有手机系统垃圾清理、上传文件等…

Redisson 分布式锁的使用详解

一、分布式锁的概述 1.1 分布式锁的背景 在单机系统中&#xff0c;Java 提供了 synchronized 和 Lock 等锁机制来确保并发情况下的线程安全。然而&#xff0c;在分布式系统中&#xff0c;多个服务实例运行在不同的物理或虚拟机上&#xff0c;无法直接使用这些本地的锁机制来控…

C# 批量更改文件后缀名称

解决问题思路 解决固定文件夹下更改文件后缀名&#xff0c;采用轮询的方式&#xff0c; 流程如下&#xff1a; 获取当前文件名&#xff08;带后缀的文件名&#xff09;截取文件名称&#xff0c;去掉后缀另存为带更改后的后缀文件 注意&#xff1a;采用第三方插件&#xff0…