-
카테고리
-
세부 분야
게임 프로그래밍
-
해결 여부
미해결
25 x 25 질문입니다
21.08.05 15:03 작성 조회수 300
1
강사님 while(true) 로 하고 강사님의 코드와 똑같이하고 실행하면 마우스 커서 포인트가 0,0 에서 25*25 계속 생성이 안되고 쭉 내려오는식으로 계속 생성이 됩니다.
using System;
namespace Algorithm
{
class Program
{
static void Main(string[] args)
{
Console.CursorVisible = false;
const int WAIT_TICK = 1000 / 30;
const string CIRCLE = "●";
int lastTick = 0;
while(true)
{
#region 프레임 관리
// FPS 프레임 ( 60프레임 OK 30프레임 이하로 내려가면 뚝뚝 끊긴다)
int currentTick = System.Environment.TickCount & Int32.MaxValue;
// 만약에 경과한 시간이 1/30 초볻 작다면 continue; 한다.
if(currentTick - lastTick < WAIT_TICK)
continue;
lastTick = currentTick;
#endregion
// 1. 입력
// 2. 로직
// 3. 렌더링
Console.SetCursorPosition(0, 0);
for(int i = 0; i < 25; i++)
{
for(int j =0; j< 25; j++)
{
Console.ForegroundColor = ConsoleColor.Green;
System.Console.Write(CIRCLE);
}
System.Console.WriteLine();
}
}
}
}
}
답변을 작성해보세요.
1
0
junogod0406
2022.06.14
저도 똑같은 증세인데요. 아마도 비주얼스튜디오쪽 문제인것 같습니다.. 가로줄 간격이 좁다랄까... 짤린다고 할까... 저도 답답하네영.. ㅜ
0
답변 3