#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <time.h>

using namespace std;

void gotoxy(int x, int y)
{
    COORD pos = {x-1, y-1};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}

int main()
{
    srand(time(NULL));
 printf("This game is like it...\n(1,1) (1,2) (1,3)\n\n(2,1) (2,2) (2,3)\n\n(3,1) (3,2) (3,3)");
    Sleep(4000);
    system("cls");
    printf("*****\n*\n*****\n*\n*");
    Sleep(2000);
    system("cls");
    printf("***\n * \n * \n * \n***");
    Sleep(2000);
    system("cls");
    printf("*   *\n**  *\n* * *\n*  **\n*   *");
    Sleep(2000);
    system("cls");
    printf("***\n*   *\n*    *\n*   *\n***");
    Sleep(2000);
    system("cls");
    printf(" ***\n*\n ***\n    *\n ***");
    Sleep(2000);
    system("cls");
    printf("*****\n  *\n  *\n  *\n  *");
    Sleep(2000);
    system("cls");
    printf("*****\n*   *\n*****\n*   *\n*   *");
    Sleep(2000);
    system("cls");
    printf("****\n*   *\n****\n* *\n*  *");
    Sleep(2000);
    system("cls");
    int a,b;
    for(int i=1; i<=5; i++)
    {
        system("cls");
        printf("Level %d",i);
        Sleep(2000);
        system("cls");
        a=rand()%i*2+1;
        b=rand()%i*2+1;
        gotoxy(a,b);
        printf("*");
        Sleep(3000);

        for(int j=1; j<=i*2; j++)
        {
            for(int k=1; k<=i*2; k++)
            {
                gotoxy(j,k);
                printf("*");
            }
        }
        gotoxy(0,11);
        printf("\nPlease type the coordinate of star.\n");
        int x,y;
        gotoxy(0,12);
        scanf("%d %d",&x,&y);
        if(x==a && y==b)
        {
            system("cls");
            printf("RIGHT!");
            Sleep(2000);
        }
        else
        {
            system("cls");
            printf("Game over...");
            printf("\n%d %d",a,b);
            return 0;
        }
    }
    system("cls");
    printf("You cleared every levels of Find Star's beta version!!");

    return 0;
}


안녕하세요. 장승호입니다.

제가 오늘은 정말 오랜만에 쓰는 글인데요...

자꾸 완벽한 프로그램 말고 베타 버전의 프로그램을 만들고 있네요...

다음에는 타자연습 프로그램과 Find Star의 정식 버전으로 인사드리겠습니다.

그러면 기억력 향상 프로그램 Find Star의 베타 버전을 많이 플레이해주시길 바라며.