Tobis Programm forked to not destroy your golden files
Fork of Robocode by
Diff: pathfinding.cpp
- Revision:
- 15:32b5d97a4281
- Parent:
- 14:9e2ce5880fb0
- Child:
- 16:4a20536c9bb8
--- a/pathfinding.cpp Wed Mar 01 08:19:42 2017 +0000 +++ b/pathfinding.cpp Wed Mar 01 15:18:50 2017 +0000 @@ -28,17 +28,19 @@ using namespace std; + +//will be replaced with uint8_t obstacle_list[row][col] = { 0 }; +//global position walkpath[5 * row] = { 0 }; -uint16_t open_list_count = 0; -uint16_t counter; //should be local -uint16_t open_list[row][col] = { 0 }; // contains open slots marked with their F value (G + H) -uint16_t g_list[row][col] = { 0 }; // G = A to square (C) in absolut number +static uint16_t open_list[row][col] = { 0 }; // contains open slots marked with their F value (G + H) +static uint16_t g_list[row][col] = { 0 }; // G = A to square (C) in absolut number - +static uint16_t open_list_count = 0; +static uint16_t counter; /************************************************************************************************************ @@ -223,7 +225,6 @@ position x = b; // lower value position y = b; // higher value - position s = b; counter = 0; walkpath[0] = y; printf("(%d | %d) \n", walkpath[0].x, walkpath[0].y);