/* This is a simple Java Application Game named "HulaHula" using Java * Author: Vilchor G. Perdido * Date: January 22, 2010 * Version: HulaHula v.1.0 */ import java.util.*; import static java.lang.System.out; public class HulaHula { static int tries = 5; static int x; static String ans; static char choice; public static void printStat() { if(tries>1) { out.println("\nYou still have " + --tries + " chances to guess the number."); } else { out.println("\nNo more tries."); } } public static void main(String[] args) { Scanner read = new Scanner(System.in); do { int randomNumber = new Random().nextInt(20) + 1; out.print("\nEnter any number from 1 to 20: "); int guessNumber = read.nextInt(); for (int x=1;x<=1;x++) { if (randomNumber>guessNumber) { out.print("\nPLEASE ENTER HIGHER NUMBER THAN " + guessNumber + "!"); printStat(); } else if (randomNumberguessNumber) { out.print("\nPLEASE ENTER HIGHER NUMBER THAN " + guessNumber + "!"); printStat(); } else if (randomNumber