for mac 관련해서 질문 드려요
67
작성한 질문수 0
삭제된 글입니다
답변 2
0
//board.cs
using System;
namespace RealgorionEx
{
class EmptyClass
{
public enum TileType
{
Empty,
Wall
}
public int Size { get; private set; }
public TileType[,] tileType { get; private set; }
public void settingTile(int Size)
{
this.Size = Size;
tileType = new TileType[Size, Size];
//블럭의 타입 설정
for (int y = 0; y < Size; y++)
{
for (int x = 0; x < Size; x++)
{
if (y == 0 || x == 0 || y == Size - 1 || x == Size - 1)
tileType[y, x] = TileType.Wall;
else
tileType[y, x] = TileType.Empty;
}
}
}
public void makingtile()
{
ConsoleColor NowColor = Console.ForegroundColor;
for (int y = 0; y < Size; y++)
{
for (int x = 0; x < Size; x++)
{
Console.ForegroundColor = settingColor(tileType[y, x]);
Console.Write('\u25CF');
}
Console.WriteLine();
}
Console.ForegroundColor = NowColor;
}
private ConsoleColor settingColor(TileType type)
{
switch(type)
{
case TileType.Empty:
return ConsoleColor.Green;
case TileType.Wall:
return ConsoleColor.Red;
default:
return ConsoleColor.Green;
}
}
}
}
0
// Program.cs
namespace RealgorionEx
{
class MainClass
{
public static void Main(string[] args)
{
EmptyClass emptyClass = new EmptyClass();
emptyClass.settingTile(25);
int a = 1;
int lasttick = 0;
while (true)
{
#region //프레임관리
int currentTick = Environment.TickCount & Int32.MaxValue;
if (currentTick - lasttick < 5000 / 30)
continue;
lasttick = currentTick;
Console.CursorVisible = false;
Console.SetCursorPosition(0, 0);
Console.WriteLine(a);
a++;
#endregion
emptyClass.makingtile();
}
}
}
}
게임개발에서 주로 어느부분에 알고리즘들이 쓰이는지 궁금합니다
0
170
2
글꼴 바꿔도 자간이 좁아 찌그러져보이시는 분들
0
87
1
NullReferenceException 예외) 같은 실수하시는분 계실까봐 남겨요
0
66
1
parent를 Pos타입으로 만든 이유
0
74
1
콘솔창에 격자가 안나옴 미로 생성 X
0
133
1
격자 생성 안됨 무한루프
0
113
1
BFS 질문
0
143
2
격자 무한 출력
0
166
2
A* 의 PriorityQueue 관련 질문입니다
0
155
2
vscode에서 원그리기
0
179
1
환결설정 강의 원 그리기
0
122
1
15-17분
0
86
1
3:16초에 근데 이렇게 해가지고 부분에 "{}"를 만들어서 자식 node들을 생성하던데 왜 중괄호로 감싸게 만드는 건가요?
0
141
2
동적 배열 관련 질문입니다!
0
209
1
Big-o 표기법에서 시간 복잡도
0
167
1
7:40에서 언급하신 색상이 날아가는 문제 이해를 못하겠습니다
0
151
1
트리구현연습 강의 질문있어요
0
142
1
창은 뜨는데 맵이 나타나지 않아요.
0
174
1
Ctrl F5 하면 나오는 창은 어디서 설정할까요??
0
271
1
void CalcPathFromParent(Pos[,] parent)에 대해서
0
202
2
NullReferenceException예외가 발생했을때 어떻게 해야하나요?
0
228
1
[해결] 환경설정 강의에서 원이 이상하게 그려지는 문제
3
309
2
오른손 법칙에서 플레이어 점이 안 움직입니다
0
243
2
맵 만들기 오류
0
178
1





