#include <stdio.h>#include <stdlib.h>Classes | |
| struct | Coords |
| A set of coordinates. More... | |
Defines | |
| #define | COLS 10 |
| #define | ROWS 10 |
| #define | START_X 0 |
| #define | START_Y 0 |
| #define | DELTA_SIZE 8 |
Functions | |
| int | path_iter (int **table, struct Coords table_size, const struct Coords *delta, int delta_size, struct Coords pos, int moves) |
| An iteration of the pathfinder algorithm. | |
| int | path_find (int **table, struct Coords table_size, const struct Coords *delta, int delta_size, struct Coords pos) |
| Finds a path. | |
| int | main () |
Variables | |
| struct Coords | delta [] |
| The default set of legal moves. | |
| #define COLS 10 |
The number of columns.
| #define DELTA_SIZE 8 |
The number of legal moves.
| #define ROWS 10 |
The number of rows.
| #define START_X 0 |
The starting x position.
| #define START_Y 0 |
The starting y position.
| int path_find | ( | int ** | table, | |
| struct Coords | table_size, | |||
| const struct Coords * | delta, | |||
| int | delta_size, | |||
| struct Coords | pos | |||
| ) |
Finds a path.
| table | A pointer to the table of values. | |
| table_size | Indicates the size of the table. | |
| delta | A pointer to the list of legal moves. | |
| delta_size | The number of legal moves. | |
| pos | The initial position on the table. |
| int path_iter | ( | int ** | table, | |
| struct Coords | table_size, | |||
| const struct Coords * | delta, | |||
| int | delta_size, | |||
| struct Coords | pos, | |||
| int | moves | |||
| ) |
An iteration of the pathfinder algorithm.
| table | A pointer to the table of values. | |
| table_size | Indicates the size of the table. | |
| delta | A pointer to the list of legal moves. | |
| delta_size | The number of legal moves. | |
| pos | The current position on the table. | |
| moves | The number of moves successfully completed. |
1.7.1