Project

General

Profile

Revision c43cef09

IDc43cef099178b85870a376d778126a6f8120363b
Parent 5d1c5d81
Child 1cb59616

Added by Hui Jun Tay about 11 years ago

Maze solve now works

View differences:

scout/libscout/src/test_behaviors/smart_runaround.h
26 26
#ifndef _SMART_RUNAROUND_H_
27 27
#define _SMART_RUNAROUND_H_
28 28

  
29
#include <math.h>
30 29
#include "../behaviors/line_follow.h"
31 30
/* Details about map:
32 31
 * 1 meter = 200 pixels
......
46 45
        void run();
47 46
    private:
48 47
	int choose_direc(int row, int col, int info);
48
        bool solve(int row, int col, int dir);
49 49
        void turn_from_to(int current_dir, int intended_dir);
50 50
        bool look_around(int row, int col, int dir);
51 51
        bool at_destination();
......
60 60
	 * map even if it starts at a boundary and goes to
61 61
	 * the other side.
62 62
         * Rows top to bottom, and columns left to right
63
	 */
63
	*/
64 64
        int map[MAP_LENGTH][MAP_LENGTH];
65 65
};
66 66
#endif

Also available in: Unified diff