I'm trying to make a game using java like minesweeper.
where it's on a grid and you have to find random squares.
I'm also imposing a 5 click limit until game over.
If you hit the gold within that time, you win, and if you hit the coal, you lose (yellow and black squares).
Only thing is, despite all my attempts with for statements and if statements, I can't seem to get it working and I'm tearing my hair out!
{
// Counts to 5 mouse clicks then if no gold or coal found it will say GAME OVER!
int i;
for (i=0; i<=5; i=i+1)
System.out.println("GAME OVER!");
}
int i;
if (i < 5)
{
// Don't interrupt game (less than 5 clicks)
System.out.println("");
i++;
}
else
{
System.out.println("GAME OVER!");
}
Thanks