Solution to find Golds in Maze
- 최초 등록일
- 2010.10.09
- 최종 저작일
- 2010.10
- 11페이지/ 한컴오피스
- 가격 1,000원
소개글
Solution to find Golds in Maze
목차
Ⅰ. Introduction
Ⅱ. Method & Experiment
1. Making maze
2. Detecting 8 Direction
3. Stack
4. Experiments
Ⅲ. Flow Chart
Ⅳ. Solution and Result (Analysis)
Ⅴ. Source code with Output
1. Clockwise
2. Anti-Clockwise
3. Output
본문내용
Ⅰ. Introduction
In this homework, professor has required students who take data structure to find golds in random maze. To solve this problem, We should use method that detect obstacles surrounding 8 directions, which is needed to use concept of stack in data structure. The method investigate the eight neighbor cells in the clockwise and anticlockwise direction. The professor requires his students to try to use both type detection.
Ⅱ. Method & Experiment
1. Making maze
I used to make maze `rand()%2` function which is random number arrangements. The function depends on seed value which makes arrangement of number. And then I inserted golds which are goals in this problem. The golds should be found by detector in this program in order to finish this problem. The golds are also made by rand function, which are notated number `2`.
2. Detecting 8 Direction
To find right way, I used method to detect 8 direction surrounding mouse. In clockwise method, mouse finds way from sequence such as
참고 자료
없음