728x90
using System;
namespace Algorithm
{
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)
{
#region 프레임 관리
//만약에 경과한 시간이 1/30초 보다 작다면
int currentTick = System.Environment.TickCount;
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();
}
}
}
}
}
728x90
'C# > C#' 카테고리의 다른 글
필드, 멤버, 지역변수, 정적필드, 정적 메소드 개념 정리 (0) | 2022.02.14 |
---|---|
[C#]문자열 출력 여러가지 방법 (0) | 2022.02.04 |
C# 가변배열 (0) | 2022.01.22 |
C#(5) : 값형식의 메모리 구조 및 처리 vs 래퍼런스의 메모리 구조 및 처리 (0) | 2022.01.22 |
C#(4) : 산술연산자와 함수 (0) | 2022.01.21 |