こんにちは、誰でも以下の私のコードを手伝ってくれますか。その下のイテレータに乱数を実装しようとしています。ここで、数値「100」は1〜100の乱数になります。
どんな助けでも大いに感謝します
ダニエル
Random randomGenerator = new Random();
for (int idx = 1; idx <= 100; ++idx){
int randomInt = randomGenerator.nextInt(100);
}
Iterator<Rectangle> iter = clouds.iterator();
while(iter.hasNext()) {
Rectangle cloud = iter.next();
//this effects the speed of downward movement
cloud.x -= 100 * Gdx.graphics.getDeltaTime();
if(cloud.x + 80 < 0) iter.remove();
}