본문 바로가기

Enginius/C / C++

길찾기 프로그램 class documentation

1. path_node class
 
i) 멤버 변수
  1. id: 노드의 번호
  2. x, y: 노드의 위치
  3. nr_link_node: 현재 노드에 연결된 노드의 수
  4. link_node[MAX_LINK_NODE_NUMBER]: 현재 노드에 연결된 노드 정보(int)
  5. nr_notice: 현재 노드에 있는 표지의 수 
  6. notices[MAX_NOTICE_NUMBER]: 표지판 정보

 ii) 멤버 함수 

  1. set(int id, double x, double y, int nr_link_node, int *link_node, int nr_notice, notice *notices) n
  2. copy(path_node *src)
  3. add_link_node(int id)
  4. add_notice(int node_number, int node_direction)


2. notice class 

 i) 멤버 변수
  1. node_id
  2. node_direction:  

 ii) 멤버 함수 
  1. set(notice *n)
  2. set(int num, int direction)


3. pedestrian class 
 
 i) 멤버 변수
  1. node_total[MAX_TOTAL_NODES];
  2. node_curr
  3. node_prev
  4. node_togo
  5. nr_notice_memory
  6. notice_memory[MAX_NOTICE_NUMBER]

 ii) 멤버 변수 
  1. set_start_node(path_node start)
  2. set_togo_node(path_node togo)
  3. set_node_total(path_node *total, int nr_total)
  4. notice_memorize(notice n)
  5. int DoIKnowWhereTogo(path_node togo)
  6. int next_node(void)
  7. int move(path_node *m)
  8. int letsGo(void)