#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<conio.h>

#define WIDTH 20
#define HEIGHT 10

char maze[HEIGHT][WIDTH]
int player_x,player_y;
int exit_X,exit_y;

int directions[4][2]={
    {0,1},
    {1,0},
    {0,-1},
    {-1,0},
};
void init_maze(){
    for(int i=0;<HEIGHT;i++){
        for(int j=0lj<WIDTH;j++){
            maze[i][j]="#"'
        }
    }
}
void generate_maze(int x,int y){
    maze[x][y];
}
for(int i=0;i<4;i++){
    int r =rand() % 4;
    temp[2];
    temp [0] = directions[i][0];
    temp[1] =directions[i][1];
    directions[i][0]=directions[r][0];
    directions[i][1]=directions[r][1];
    directions[r][0]=temp[0];
    directions[r][1]=temp[1];
}
for(int i=0;i<4;i++){
    int nx =x + directions[i][0]*2;
    int ny = y+directions[i][1]*2;
    if(nx>=0 &&ny >= 0 &&ny <WIDTH && maze[nx][ny]=='#'){
        maze[x+directions[i][o]][y+directions[i][1]]= ' ';
        generate_maze[nx][ny]
    }
        
}
}
void print_maze(){
    system("cls");
    for(int i =0;i<HEIGHT;i++){
        for()
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: