コード例 #1
0
 void GenerateApple()
 {
     do
     {
         apple.x = rng.Next(Constants.SCREEN_SIZE);
         apple.y = rng.Next(Constants.SCREEN_SIZE);
     } while(snake.CheckCollision(apple.x, apple.y));
 }