Written on
·
305
0
코드를 그대로 짰는데 밑 화면처럼 나오네요 random
public void make_sidewinder()
{
Random random = new Random();
for (int y = 0; y < Length; y++)
{
int count = 1;
for (int x = 0; x < Length; x++)
{
if (x % 2 == 0 || y % 2 == 0)
continue;
if (random.Next(0, 2) == 0)
{
type[y , x+1] = Colortype.Empthy;
count++;
}
else
{
int randomindex = random.Next(0, count);
type[y+1 , x - randomindex*2] = Colortype.Empthy;
count = 1;
}
}
}
}