<prompt> Andika programu ya C ambayo hutengeneza misururu ya nasibu kwa kutumia kanuni za Prim, zionyeshe kama sanaa ya ASCII, na humruhusu mtumiaji kupita kwenye mpangilio kwa kutumia kuingiza kibodi.  <response>: cpppamoja na pamoja na pamoja na pamoja na pamoja na kutumia nafasi ya majina std;const int WIDTH 21;const int UREFU 11;const char UKUTA ;const char PATH ;const char PLAYER ;Mwelekeo wa enum JUU, CHINI, KUSHOTO, KULIA ;muundo wa seli int x, y; bool alitembelea;;utupu kuzalishaMazevekta maze vector mpaka; auto addFrontier int x, int y ikiwa x 0 x WIDTH y 0 y HEIGHT !mazeyx frontier.push_backx, y; mazeyx UKUTA; ; srandwakati0; int startX rand WIDTH 1; int startY rand HEIGHT 1; mazestartYstartX NJIA; addFrontierstartX - 2, startY; addFrontierstartX 2, startY; addFrontierstartX, startY - 2; addFrontierstartX, startY 2; huku !frontier.empty int index rand frontier.size; Kiini cha sasa frontierindex; frontier.erasefrontier.begin index; vector maelekezo; ikiwa current.y 1 mazecurrent.y - 2current.x NJIA maelekezo.sukuma_nyumaUP; ikiwa current.y HEIGHT - 2 mazecurrent.y 2current.x NJIA maelekezo.sukuma_nyuma CHINI; ikiwa current.x 1 mazecurrent.ycurrent.x - 2 NJIA maelekezo.sukuma_nyumaKUSHOTO; ikiwa current.x WIDTH - 2 mazecurrent.ycurrent.x 2 NJIA maelekezo.sukuma_nyumaKULIA; ikiwa !maelekezo.tupu Mwelekeo dir maelekezorand directions.size; kubadili dir kesi UP: mazecurrent.y - 1current.x NJIA; addFrontiercurrent.x, current.y - 2; mapumziko; kesi CHINI: mazecurrent.y 1current.x NJIA; addFrontiercurrent.x, current.y 2; mapumziko; kesi KUSHOTO: mazecurrent.ycurrent.x - 1 NJIA; addFrontiercurrent.x - 2, current.y; mapumziko; kesi KULIA: mazecurrent.ycurrent.x 1 NJIA; addFrontiercurrent.x 2, current.y; mapumziko; void printMazeconst vector maze, int playerX, int playerY kwa int y 0; y HEIGHT; y kwa int x 0; x WIDTH; x ikiwa x mchezajiX y mchezajiY cout MCHEZAJI; mwingine cout mazeyx; cout endl; bool movePlayervekta maze, int playerX, int playerY, Direction dir int newX playerX; int newY playerY; kubadili dir kesi JUU: --mpyaY; mapumziko; kesi CHINI: mpya; mapumziko; kesi KUSHOTO: --newX; mapumziko; kesi KULIA: newX; mapumziko; ikiwa mazenewYnewX NJIA playerX newX; playerY newY; kurudi kweli; kurudi kwa uwongo;int main vekta mazeHEIGHT, vektaWIDTH; kuzalishaMazemaze; int playerX 1; int playerY 1; wakati kweli mfumo CLS; printMazemaze, playerX, playerY; ikiwa _kbhit ufunguo wa char _getch; Dir ya mwelekeo; kubadili ufunguo kesi w: kesi W: dir UP; mapumziko; kesi s: kesi S: dir CHINI; mapumziko; kesi a: kesi A: dir LEFT; mapumziko; kesi d: kesi D: dir HAKI; mapumziko; chaguo-msingi: endelea; movePlayermaze, playerX, playerY, dir; kurudi 0;Mpango huu wa C hutoa maze nasibu kwa kutumia kanuni za Prim na kuzionyesha kama sanaa ya ASCII. Mtumiaji anaweza kuvinjari kwenye mlolongo kwa kutumia ingizo la kibodi vifunguo vya WASD. Kumbuka kuwa msimbo huu hutumia mfumoCLS kufuta skrini ya kiweko, ambayo inategemea jukwaa na huenda isifanye kazi kwenye mifumo yote. Zaidi ya hayo, hutumia vitendaji vya _kbhit na _getch kutoka kwa kichwa cha , ambavyo pia vinategemea jukwaa na vinaweza kuhitaji marekebisho kwa mifumo isiyo ya Windows. 