Results 1 to 2 of 2
Thread: I dunno what to do next :'(
- 08-21-2012, 12:30 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 3
- Rep Power
- 0
I dunno what to do next :'(
Hey guys, i'm making a typing game and i am begging all of you to help me. I have some problems making the next word appear after you get the first one. And can also help me guys on how to put a 2 minute timer? Here's the code:
ADVANCED THANK YOU GUYS FOR HELPING ME!!!Java Code:import java.util.Random; import java.util.Scanner; public class Easy { public static void main (String []args){ String words[]={"Love", "Hate", "Truth", "Happy", "Pressure", "Burp", "Vampire" , "Surf", "Believe", "Slime", "Dream", "Religion", "Rhythm", "Disco", "Honey", "Star", "Armies", "Zombie", "Heart", "Break", "Docks", "Multiply", "Mace", "Moustache" , "Wizards", "Sports", "Blind", "Riddle", "Business", "School", "Blood", "Promenade", "Vault", "Spray", "Eternal", "Dress", "Abstain", "Controls", "Circuit", "Forever", "Dangerous", "Skunk", "House", "Wives", "Flashlight", "Console", "Awesome", "Scared", "Hormones", "Promise", "Angel", "Baggage", "Duck", "Destroy", "Tissue", "Ketchup", "Picture", "Basket", "Basketball", "Fan", "Dough", "Thief", "Female", "Family", "Normal", "Wireless", "Empty", "Cycles", "Banana", "Eggplant", "Samba", "Jumble", "Flush", "Beach", "Driver", "Queen", "Mommy", "Fade", "Kitten", "Spring", "Interest", "Debts", "Horse", "Tomorrow", "Discount", "Faithful", "Midnight", "Epic", "Calendar", "Roses", "Funeral", "Badminton", "Spirit", "Water", "Pizza", "Science", "Cabinet", "Apple", "Television", "Profile", "Wine", "Sedan", "Luxury", "Firewall", "Computer", "Tablet", "Giraffe", "Ring", "Shut", "Vision", "World", "War", "High", "School", "Fantasy", "Warfare", "Incognito", "Loading", "Penguins", "Fright", "Night", "Diary", "Mega", "Submit", "Hold", "Statue", "Boat", "Mobile", "Invisible", "Visible", "Ground", "Space", "Dragon", "Spade", "Clover", "Senior", "Junior", "Sophomore", "Freshman", "Twilight", "Dawn", "Eclipse", "Moon", "Hair", "Spray", "Camp", "Jazz", "Rock", "Eggs", "Hustle"}; Scanner sc = new Scanner(System.in); Random a = new Random(); int roll = a.nextInt(149); String type = ""; String reply = "yes"; int error = 0; System.out.println(words[roll]); while (!reply.equalsIgnoreCase("no")){ if (!reply.equalsIgnoreCase("yes")) System.out.println("Yes and No are the only acceptable answers"); else { System.out.println("Type the word"); while (!type.equals(words[roll])){ type = sc.next(); try { if (!type.equals(words[roll])){ System.out.println("Type again"); error++; } else { if (!type.equals(words[roll])) System.out.println("next word"); } }catch(Exception e){ System.out.println("lallalala"); } } } type = ""; System.out.println("Would you like to play again? Yes/No"); reply = sc.nextLine(); roll = a.nextInt(149); } System.out.println("Thank you for playing"); } }
- 08-21-2012, 12:53 PM #2
Re: I dunno what to do next :'(
Try reading the Forum Rules -- particularly the second and third paragraphs.
db
THREAD CLOSEDWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
repaint class doesnt work anymore... dunno why..
By Addez in forum New To JavaReplies: 9Last Post: 11-07-2009, 09:10 PM


LinkBack URL
About LinkBacks


Bookmarks