View Single Post
  #1 (permalink)  
Old 07-22-2007, 11:57 PM
lenny lenny is offline
Member
 
Join Date: Jul 2007
Posts: 40
lenny is on a distinguished road
Help with my game in java
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!

Code:
{ // 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!"); }
Code:
int i; if (i < 5) { // Don't interrupt game (less than 5 clicks) System.out.println(""); i++; } else { System.out.println("GAME OVER!"); }
Thanks
Reply With Quote
Sponsored Links