시스템 프로그래밍 3주차
2026.09.17 13:10
void DrawDinorsaur(int dinosaurHead)
{
move(dinosaurHead, 0);
static bool legDraw = true;
printw(" &&&&&&& \n");
printw(" && &&&&&&\n");
printw(" &&&&&&&&&\n");
printw("& &&& \n");
printw("&& &&&&&&& \n");
printw("&&& &&&&& \n");
printw(" && &&&&&&&&&& \n");
printw(" &&&&&&&&&&& \n");
printw(" &&&&&&&&&& \n");
printw(" &&&&&&&& \n");
printw(" &&&&&& \n");
if (legDraw) {
printw(" & &&& \n");
printw(" && ");
legDraw = false;
}
else {
printw(" &&& & \n");
printw(" && ");
legDraw = true;
}
}
void DrawZombie(int zombieHead, int zombieCol)
{
static bool legSwap = true;
const char *body[] = {
" .-##-. ",
"( o o )",
" \\ ~~ / ",
"--| |--",
" || "
};
for (int i = 0; i < 5; i++) {
move(zombieHead + i, zombieCol);
printw("%s", body[i]);
}
if (legSwap) {
move(zombieHead + 5, zombieCol); printw(" / \\ ");
move(zombieHead + 6, zombieCol); printw(" / \\ ");
legSwap = false;
} else {
move(zombieHead + 5, zombieCol); printw(" | | ");
move(zombieHead + 6, zombieCol); printw("/ \\");
legSwap = true;
}
}
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| » | 시스템 프로그래밍 3주차 | MNA 관리자 | 2026.09.17 | 96 |