using System;
using System.Collections;
using System.Reflection;
namespace CSharp1
{
class Program
{
static void Main(string[] args)
{
Console.CursorVisible = false;
const int WAIT_TICK = 1000 / 30;
const char CIRCLE = '\u25cf';
int lastTick = 0;
while (true)
{
//FPS 프레임 (60프레임 OK 30 프레임 이하는 X)
#region 프레임 관리
int currentTick = System.Environment.TickCount;
//만약에 경과한 시간이 1/30초보다 작다면
if (currentTick - lastTick < WAIT_TICK)
continue;
lastTick = currentTick;
#endregion
//입력
//로직
//렌더링
Console.SetCursorPosition(0, 0);
for (int i = 0; i < 25;i++)
{
for (int j = 0; j < 25;j++)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.Write(CIRCLE);
}
Console.WriteLine();
}
}
}
}
}
'알고리즘 및 디자인패턴' 카테고리의 다른 글
연결 리스트 구현 연습 (0) | 2023.07.13 |
---|---|
동적 배열 구현 연습 (0) | 2023.07.13 |
배열, 동적 배열, 연결 리스트 비교 (0) | 2023.07.13 |
BIG-O표기법 (0) | 2023.07.12 |
디자인 패턴 종류와 특성 (0) | 2023.06.29 |