INF2004-Project v0.1
 
Loading...
Searching...
No Matches
dfs.h
Go to the documentation of this file.
1
12#ifndef DFS_H // Include guard.
13#define DFS_H
14
15#include <stdint.h>
16#include "pathfinding/maze.h"
18
19// Public function prototypes.
20// ----------------------------------------------------------------------------
21//
22
24 maze_grid_cell_t *p_start_node,
25 maze_navigator_state_t *p_navigator,
26 floodfill_explore_func_t p_explore_func,
27 floodfill_move_navigator_t p_move_navigator);
28
30 maze_navigator_state_t *p_navigator);
31
32#endif // DFS_H
33
34/*** End of file main/pathfinding/dfs.h ***/
void dfs_depth_first_search(maze_grid_t *p_grid, maze_grid_cell_t *p_start_node, maze_navigator_state_t *p_navigator, floodfill_explore_func_t p_explore_func, floodfill_move_navigator_t p_move_navigator)
Conducts a depth first search on a maze.
Definition: dfs.c:45
bool dfs_is_all_reachable_visited(maze_grid_t *p_grid, maze_navigator_state_t *p_navigator)
Checks if all reachable nodes from the navigator's current position has been visisted.
Definition: dfs.c:132
This file contains the function prototypes for the floodfill algorithm for mapping of the maze.
uint16_t(* floodfill_explore_func_t)(maze_grid_t *p_grid, maze_navigator_state_t *p_navigator, maze_cardinal_direction_t direction)
This function pointer type is used to explore the maze. It is expected to return the walls that the r...
Definition: floodfill.h:34
void(* floodfill_move_navigator_t)(maze_navigator_state_t *p_navigator, maze_cardinal_direction_t direction)
Moves the navigator/robot in the specified direction.
Definition: floodfill.h:46
Header file for the maze data structure and public functions.
This struct contains the node information.
Definition: maze.h:91
This struct contains the maze grid information.
Definition: maze.h:113
This struct contains the state of a navigator in the maze.
Definition: maze.h:124