so im doing this project for my cs class and we have create a simple minesweeper game. in one particular part at the beginning of the program i have to write a function to start a new game. i have to generate 10 bombs (represented by -1) randomly into my 2d array, how do i check for duplicates, because they generate on the board...but sometimes only 8 or 9 show up due to the rand generating one in the same spot twice.
is this "legal"? will i foresee any problems with this code? the thing is, my teacher made it to where they can seed the random themselves,making it srand(seed) and they input a number for seed, and lower numbers, such as 1-90 work fine and makes 10 bombs...but then i tried something like 10000 and it only made 9 bombs.