디시인사이드 갤러리

갤러리 이슈박스, 최근방문 갤러리

갤러리 본문 영역

행님들 life game 프로그래밍 도와줘 ㅠㅠㅠㅠ

횽들도와줭 (119.202) 2011.05.16 21:37:07
조회 80 추천 0 댓글 7

형들 life game이라고 알아??

뭐 그런건 다 내가 주어줄께

문제 하나 풀어야하는데 ㅠㅠㅠㅠㅠㅠ너무 어렵당..ㅠㅠㅠ 도와줘!

자~ 문제 조건갑니다...(영어로 되어서 과연 이거 풀 수 있을까...)
1. Every empty cell with three living neighbors will come to life in the next generation.
2. Any cell with one or zero neighbors will die of loneliness, while any cell with four or more neighbors will die from overcrowding.
3. Any cell with two or three neighbors will live into the next generation.
4. All births and deaths occur simultaneously.
Make a program described as below.
1. Make an initial 20 X 20 array whose element represents a gene capsule.
2. Make a “Display_Gene” function that displays the array to the screen. First clear the screen. Then print all elements of the array. Each living gene is represented as „*‟ and dead gene is represented as a blank character.
3. Make an "Initialize_Gene" function that randomly assigns true or false to the elements of the array. Generate a random number between 0 and 1 and if it is larger than GENE_PROB, then assign true, otherwise it is false.
4. Make a "Neighbors" function will be used to calculate the number of neighbors for a given cell. Neighbor of a cell represents neighboring array elements. There are at maximum 8 neighboring cells.
5. Make a "Cell_Evolve" Function that calls the "Neighbors" function and evolves by controlling which cells live and die.
6. The program will prompt the user to load a scenario or generate a random starting grid
7. If the user chooses a random starting grid, the program will prompt the user for a percentage (GENE_PROB) that represents the probability that a given cell will be occupied by a living gene.
8. If the user chooses to load a scenario, the program prompts the user to enter the file name of the scenario.
9. Scenarios are stored as text files. Each line represents each row of an array. Each character represents the status of each element. If it is „*‟, the corresponding element has a living gene.
10. After the generation of initial array, Call Display_Gene to show the initial layout of genes.
11. For each evolution, ask an input to continue or stop. When a user inputs to go one more evolution, call Cell_Evolve, then call Display_Gene to display the status of the evolved genes. If a user input to repeat, repeat the above calls for 10 times. Put a delay between consecutive displays.

혹시 이거를 할 수 있는 횽들 있어??ㅠㅠ

추천 비추천

0

고정닉 0

0

댓글 영역

전체 댓글 0
등록순정렬 기준선택
본문 보기

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 리스트
번호 제목 글쓴이 작성일 조회 추천
설문 주위의 유혹에 쉽게 마음이 흔들릴 것 같은 스타는? 운영자 24/10/21 - -
277297 쿠캬캬님 재귀적으로 생각해봐도 안되요 [9] 이힝(121.177) 11.10.01 76 0
277296 성대아싸횽은 봅니다 [4] +어게인갤로그로 이동합니다. 11.10.01 96 0
277294 개발자들에게 야근수당이 없는 이유 다 알고 있지 않냐? [5] 허세강갤로그로 이동합니다. 11.10.01 243 0
277292 난 지금 피시방에 왔당 [1] y녀6디리(60.196) 11.10.01 40 0
277290 오늘 변자횽이랑 카오스함 ㅋㅋ 쿄스케갤로그로 이동합니다. 11.10.01 40 0
277289 이거 어떻게 하는거야? 다이얼로그에 그림 출력 하이(125.128) 11.10.01 57 0
277288 그이의 물건은 Micro 하고..  Soft 했답니다.. 때릴꺼야?(119.67) 11.10.01 75 0
277287 스탠포드, MIT, 버클리가 좋은 일 하는듯 [2] 멸자(130.126) 11.10.01 111 0
277286 한글 파일 비번 강제입력방식으로 풀줄아시는분 무작위대입 사례 있음 진짜 [5] dksdudgh(14.48) 11.10.01 92 0
277284 유튜브 좋다 [3] 탐라국(121.159) 11.10.01 68 0
277283 형들 트위터 개발자 등록하는거 바뀌었어? [1] 트위터왕초보(1.224) 11.10.01 102 0
277282 슈즈케 예림이 하악하악 [1] 거칠게갤로그로 이동합니다. 11.10.01 105 0
277281 스큐어 횽 [1] 로하로하알로하갤로그로 이동합니다. 11.10.01 37 0
277280 내가 겪은 구글 본사 면접 문제 4 [7] secure갤로그로 이동합니다. 11.10.01 244 0
277279 안드로이드 프레임웍단 개발하는 횽들있어? 호야(175.197) 11.10.01 52 0
277277 내가 유툽에서 스탠포드 기계학습 강의를 한번 봐쓴ㄴ데 [4] 멸자(130.126) 11.10.01 135 0
277276 외곽선 빠르게 추정하는 알고리즘 [1] [성대아싸]갤로그로 이동합니다. 11.10.01 123 0
277275 내가 겪은 구글 본사 면접 문제 3 [20] secure갤로그로 이동합니다. 11.10.01 306 0
277274 오늘 대학로 8시에 치맥 달릴 사람들 있냐? [3] monoless갤로그로 이동합니다. 11.10.01 99 0
277272 영어면접 드립 [1] 전간디갤로그로 이동합니다. 11.10.01 93 0
277271 퀵정렬 만들어봤는데 소스를 좀더 아름답게 할순 없을까?? [1] SODMaster갤로그로 이동합니다. 11.10.01 92 0
277270 형들 C언어로 된 소스코드중에 [1] ♪♩안봉봉♬갤로그로 이동합니다. 11.10.01 69 0
277269 흉님들 다시 질문 올립니다 대규모 데이터 처리를 해야 [3] 회색사과갤로그로 이동합니다. 11.10.01 56 0
277268 내가 겪은 구글 본사 면접 문제 2 [70] secure갤로그로 이동합니다. 11.10.01 384 0
277267 서울사는 프갤러들아 [1] Adelposs갤로그로 이동합니다. 11.10.01 64 0
277265 내가 겪은 인터뷰 문제는 [4] 전간디갤로그로 이동합니다. 11.10.01 85 0
277264 로하로하행님 검색해봐도 글케 찍는법은 몰르겟심다ㅜㅜ [2] 쥬피썬더갤로그로 이동합니다. 11.10.01 53 0
277262 ssd이야기 [13] noname(211.200) 11.10.01 180 0
277261 앱등이 븅신들 어휴 로하로하알로하갤로그로 이동합니다. 11.10.01 49 0
277260 내가 겪은 구글 본사 면접 문제 [44] secure갤로그로 이동합니다. 11.10.01 439 0
277259 로하로하행님 스샷 글케 어케 찍어요?? [1] 쥬피썬더갤로그로 이동합니다. 11.10.01 57 0
277258 ACM-ICPC 5분전 [1] 우왕(1.214) 11.10.01 58 0
277257 ㅎ행님들 곰플로 미드보는데 이거 어케하는지좀 알려주소ㅜㅜ [3] 쥬피썬더갤로그로 이동합니다. 11.10.01 58 0
277255 열도의 정신 나간 설정.jpg [4] dd(222.107) 11.10.01 237 0
277254 윈도우7 깔려고하는데 [6] ㅡㅡ(125.152) 11.10.01 89 0
277253 너희들 시발 핀과 제이크와 어드벤쳐 타임은 보고 디시질 하냐? Adelposs갤로그로 이동합니다. 11.10.01 56 0
277252 나한테는 흥미로운 코드이다 [8] 로하로하알로하갤로그로 이동합니다. 11.10.01 149 0
277251 #define 질문ㅋ [5] apple(58.229) 11.10.01 96 0
277250 svhost.exe 이거 뭐냐? [7] 천재해커(119.207) 11.10.01 568 0
277249 근데 SSD 10만 번 다시 쓸 수 있다는데 그거 수명 무한 아님? [4] 쁘띠거니(218.50) 11.10.01 160 0
277248 와 씨발 파코즈 가봤는데 신세계임 [3] 로하로하알로하갤로그로 이동합니다. 11.10.01 113 0
277247 실력 있는 프로그래머의 특징. [1] 천재해커(119.207) 11.10.01 173 0
277246 근데 SSD 쓰면 메모리 조금만 사고 가상메모리도 돌려도 됨? [5] 쁘띠거니(218.50) 11.10.01 123 0
277245 형들 물어볼게 있어 [2] laoshanlong갤로그로 이동합니다. 11.10.01 34 0
277243 아놔 씨발 ㅡㅡ [3] 통맥갤로그로 이동합니다. 11.10.01 105 0
277242 사실 퀵소트가 가장 빠른건 아니지. [4] 개발자(112.220) 11.10.01 188 0
277240 spring 3 만지기 시작한지 10일째... 심오하다 꼬꼬월드갤로그로 이동합니다. 11.10.01 66 0
277239 c++에서 using namespace의 범위를 한정지을 순 없을까 [3] 궁금이(121.129) 11.10.01 64 0
277238 형들 무지막지하게 많은 숫자들을 처리해야 하는데.. [2] 회색사과갤로그로 이동합니다. 11.10.01 68 0
277237 공인 인증서 아무대나로 옮겨도 되나? [4] 로하로하알로하갤로그로 이동합니다. 11.10.01 75 0
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2