Generate Random Number Loop
Hello, thank you for visiting this thread..
I have a problem on my board game..
First I want to generate 2 random numbers, those 2 random numbers will become the coordinates of the board and then after that It will check if the string on the button is not enemy, if the button is not enemy it will generate random numbers again and checked again..
this is the piece of the code..
the [randomIntX][randomIntY] have errors too.. I dont know how to fix it.
int randomIntX = randomX.nextInt(7);
int randomIntY = randomY.nextInt(8);
And how do i check if the string on the button is not "enemy" those code give me errors..
Could you please help me.. thanks!