// ------------------------------------------------------------------------------------------------------- // // This program creates a board, on which player can move around // // 03/2017 // // TODO: Recursive division method of generating a maze // https://en.wikipedia.org/wiki/Maze_generation_algorithm // http://weblog.jamisbuck.org/2011/1/12/maze-generation-recursive-division-algorithm // // ------------------------------------------------------------------------------------------------------- #include // standard Input Output functions - printf, scanf, getchar, ... #include #include // definition of 'bool' type, 'true' and 'false' // defitions of dimensions of the board #define WIDTH 25 #define HEIGHT 25 // defitions of objects on the board #define PLAYER 'O' #define WALL '#' #define SPACE '.' char array[WIDTH][HEIGHT]; // declare an array for the board int row, col; // declare basic variables int row_player, col_player; // declare variables that hold current position of a player row_player = 5; col_player = 2; // define starting player coordinates // This function goes through the board and fill each field either with empty SPACE or with a WALL (if it's around) void prepare_board() { for( row=0; row