Skip to content

Commit 3048ee0

Browse files
author
Shota Aoki
authored
STEP12 MapManagerのリファクタリング (#17)
* MapManagerの未使用関数を削除 * MapManagerクラスの関数定義と実装の順番を変更
1 parent 5e2567e commit 3048ee0

File tree

2 files changed

+174
-190
lines changed

2 files changed

+174
-190
lines changed

uROS_STEP12_micromouse/map_manager.h

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,35 @@ typedef struct
3030

3131
class MapManager
3232
{
33-
private:
34-
unsigned short steps_map[MAZESIZE_X][MAZESIZE_Y]; //歩数マップ
35-
t_wall wall[MAZESIZE_X][MAZESIZE_Y]; //壁の情報を格納する構造体配列
36-
t_position mypos;
37-
short goal_mx, goal_my;
38-
3933
public:
40-
void view(char view_weight_f);
34+
MapManager();
35+
4136
void positionInit(void);
42-
void setMyPos(char x, char y, t_direction_glob dir);
4337
void setMyPosDir(t_direction_glob dir);
4438
short getMyPosX(void);
4539
short getMyPosY(void);
4640
t_direction_glob getMyPosDir(void);
4741
char getWallData(unsigned char x, unsigned char y, t_direction_glob dir);
4842
void setWallData(unsigned char x, unsigned char y, t_direction_glob dir, char data);
49-
unsigned short getStepMapData(unsigned char x, unsigned char y);
5043
char getGoalX(void);
5144
char getGoalY(void);
5245
void setGoalX(short data);
5346
void setGoalY(short data);
54-
55-
void makeMap2(int x, int y);
56-
void makeSearchMap(int x, int y);
57-
t_direction getNextDir2(short x, short y, t_direction_glob * dir);
58-
t_direction getNextDir(char x, char y, t_direction_glob * dir);
5947
void axisUpdate(void);
6048
void nextDir(t_direction dir);
61-
void wallch(int x, int y, int x2, int y2);
6249
void setWall(bool IS_SEN_FR, bool IS_SEN_R, bool IS_SEN_L);
63-
int getPriority(unsigned char x, unsigned char y, t_direction_glob dir);
50+
t_direction getNextDir(char x, char y, t_direction_glob * dir);
51+
t_direction getNextDir2(short x, short y, t_direction_glob * dir);
6452

65-
MapManager();
53+
private:
54+
unsigned short steps_map[MAZESIZE_X][MAZESIZE_Y]; //歩数マップ
55+
t_wall wall[MAZESIZE_X][MAZESIZE_Y]; //壁の情報を格納する構造体配列
56+
t_position mypos;
57+
short goal_mx, goal_my;
58+
59+
void makeSearchMap(int x, int y);
60+
void makeMap2(int x, int y);
61+
int getPriority(unsigned char x, unsigned char y, t_direction_glob dir);
6662
};
6763

6864
#endif // MAP_MANAGER_H_

0 commit comments

Comments
 (0)