for (var i = 0; i < 10; i++) {
bommen[i] = [
Math.floor(Math.random() * 10),
Math.floor(Math.random() * 10)];
}
This is my code for generating random 'bomb-coordinates'. It works, but it can put two bombs at the same place. The first Math.floor()
is the X coordinate, and the second the Y coordinate. Does anyone have an idea how to fix this?