Results 1 to 5 of 5
- 08-21-2012, 12:10 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 3
- Rep Power
- 0
Help me guys do my very first java game!!!!
Hey guys, i'm making a typing game and i am begging all of you to help me. Of course you will all have credit if you 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"); } }Last edited by mrprogrammer; 08-21-2012 at 12:23 PM.
- 08-21-2012, 12:54 PM #2
Re: Help me guys do my very first java game!!!!
Please go through the Forum Rules -- particularly the second and third paragraphs.
Your other thread has been closed.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
-
- 08-21-2012, 01:17 PM #4
Member
- Join Date
- Aug 2012
- Posts
- 3
- Rep Power
- 0
- 08-22-2012, 10:30 PM #5
Re: Help me guys do my very first java game!!!!
If this is a command line app, have you looked at Timer (Java Platform SE 6) timers?
Similar Threads
-
Hi guys i am new to programming in java
By karthikumar1986 in forum New To JavaReplies: 6Last Post: 03-11-2011, 08:52 AM -
Hi guys i am new to java
By karthikumar1986 in forum New To JavaReplies: 1Last Post: 03-04-2011, 09:23 AM -
help guys on java me
By arc_remiel in forum New To JavaReplies: 6Last Post: 02-24-2011, 04:21 PM -
hi guys help me in math.random () in java
By funkygarzon in forum New To JavaReplies: 5Last Post: 08-09-2010, 04:48 AM -
Cheers to Java Guys
By right2001 in forum IntroductionsReplies: 0Last Post: 02-16-2009, 03:10 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks