U E D R , A S I H C RSS

새싹교실/2011/무전취식/레벨11

  • : 2011/6/07 5~6
  • : 06
  • : 11



2. Ice Breaking


: . 팻트 2/3 . . . ?

: 회탐 . . . . . .

태 : 함, ' ' . . 8pt . 한테 12 . '홈 ' .

: . 학 . . 함. . 함. '' ㅋㅋ . . . ㅋㅋㅋ 킴. ' ' . '트' ㅋㅋㅋ . . . 함. . 킴. . . 토 . 10 형한테 화해 함. 11 . . 화하 '' 7 . . . '' . 3 함. 화형 . . 함 ㅋㅋㅋ Easy . . 500 함. . . 1 2(45m) 2 . '~'하 . . 함. 65 m . . 킨 7 . . 화형 . . . . . . 12 . . . . . . . . 4 . 11 . . . . . . . WWDC 4 .

: . 6 2 . 1 2 3 . . . . . 행. . 토 . 10 70 ㅋㅋㅋ . . ''형 . . 40 20 .

: . . . 함. 한테 . . '토' '' . . . . 한 30. . 함. . 트해 1 5 ㅠㅠ 탐. ! 4 . 'ㅅ'

: 토 . . . . 함.


2.1.


태 : 토 . => 800.

: 행 2 . . . . .

: . . . . 회화 .

: 토!!! .

: .

2.2.


태 : . . .

: 2학 . 4.0. ㅋㅋㅋ

: . . : .

: .

: .


3.




  • String

4.


  • : F4(ThreeFs + Future Action Plan) .
    • : ThreeFs, ThreeFs(크), FiveFs(크)

      • Facts, Feelings, Findings, Future Action Plan. , , , , 획.
      • : " 5 .() .() .() .( 획)"

  • ! 한 학!! . 히 한 . . ! . C 히 하 . 티 훑 5 5. . ~! 환해. ! -

  • ㅋㅋ ㅜㅜ ppt ppt . .... ㅋ -

5.


~C
#include <stdio.h>

#define N 12
#define RIGHT 0
#define LEFT 1
#define UP 2
#define DOWN 3

char m[N][N+1] = {
"############",
"#...#......#",
"S.#.#.####.#",
"###.#....#.#",
"#....###.#.E",
"####.#.#.#.#",
"#..#.#.#.#.#",
"##.#.#.#.#.#",
"#........#.#",
"######.###.#",
"#......#...#",
"############"};

int xpos, ypos, dir;

void getStartPos();
void move_pos();
void print_maze();

int main()
{
	int i;

	getStartPos(); // Where is S?
	print_maze();  // printf maze


	while (1) {
		move_pos();
		if (m[ypos][xpos]=='E') break;
		print_maze();
		
		getchar();
	}

	print_maze();

	return 0;
}

void move_pos()
{
	// .

	// .

	//RIGHT   RIGHT        .
	//RIGHT  DOWN  RIGHT  UP. 
	//   .
	switch (dir) {
		case RIGHT :
			++xpos;
			if (m[ypos+1][xpos]!='#') dir=DOWN;
			else if (m[ypos][xpos+1]!='#') dir=RIGHT;
			else if (m[ypos-1][xpos]!='#') dir=UP;
			else dir=LEFT;
			break;

		case LEFT :
			--xpos;
			if (m[ypos-1][xpos]!='#') dir=UP;
			else if (m[ypos][xpos-1]!='#') dir=LEFT;
			else if (m[ypos+1][xpos]!='#') dir=DOWN;
			else dir=RIGHT;
			break;

		case UP :
			--ypos;
			if (m[ypos][xpos+1]!='#') dir=RIGHT;
			else if (m[ypos-1][xpos]!='#') dir=UP;
			else if (m[ypos][xpos-1]!='#') dir=LEFT;
			else dir=DOWN;
			break;

		case DOWN :
			++ypos;
			if (m[ypos][xpos-1]!='#') dir=LEFT;
			else if (m[ypos+1][xpos]!='#') dir=DOWN;
			else if (m[ypos][xpos+1]!='#') dir=RIGHT;
			else dir=UP;
			break;
	}
}


void getStartPos()
{
	// assume 'S' is on the left side of the maze 
	// and the initial direction is RIGHT
	int i,j;
	for (i=0;i<N;i++) {
		for (j=0;j<N;j++) {
			if (m[i][j]=='S') {
				xpos=j;
				ypos=i;
			}
		}
	}
	dir=RIGHT;
}


void print_maze()
{
	int i,j;
	for(i=0;i<N;i++){
		for(j=0;j<N;j++){
			if(i==ypos && j==xpos){
				printf("X");
			}
			else{
				printf("%c", m[i][j]);
			}
		}
		printf("\n");
	}
	printf("\n");
}

6.


  • ㅜㅜ
  • 한테!
  • Zeropage


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:43
Processing time 0.0532 sec