Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class playerName {
  5. public static void main(String[] args){
  6. Scanner input = new Scanner (System.in);
  7. System.out.println("In a world where every turn is filled with\n" +
  8. "danger, the only thing that stands between you and\n" +
  9. "death is.... MENTAL MATH!!!!!");
  10. System.out.print("Enter Name:");
  11. String playerName = input.nextLine();
  12. System.out.println(playerName);
  13. if (playerName.equals("tak11")) {
  14. System.out.println("well I guess you win.");
  15. System.exit(0);
  16. } else {
  17. System.out.println("Welcome, " + playerName + "!");
  18. }
  19. System.out.println("The year is 2050. You are on the colonial planet\n" +
  20. "Zilon. Recently, a series of new alien races has appeared and\n" +
  21. "started scaring the citizens of the colony. It is up to you\n" +
  22. "and your amazing mental math skills to defeat the aliens and\n" +
  23. "save the colony. You may not use calculators while playing\n" +
  24. "this game. All math must be done mentally." +
  25. "Good luck," + playerName + ".");
  26. System.out.println("You are outside of the colony grounds,\n" +
  27. "doing a routine survey of the area. everything is guiet and\n" +
  28. "normal.");
  29. System.out.println("Oh no!!! A giant Lurker has jumped out of a hole\n" +
  30. "in the ground!!! What do you do?");
  31. System.out.print("Options:\n " +
  32. "1. Run screaming\n" +
  33. "2. Pull out your sword and hack away\n" +
  34. "3. Punch the Lurker in the face\n" +
  35. "4. Try to make friends with it \n");
  36. System.out.print("Put the number of your choice:");
  37. if (playerOption.equals("1")) {
  38. System.out.println("You run screaming. The Lurker attacks" +
  39. "the colony, killing all the colonists. You fail in" +
  40. "your main objective. Game Over.");
  41. System.exit(0);
  42. if (playerOption.equals("2")) {
  43. System.out.print("You attack the Lurker. Find the answer to" +
  44. "25 + 15 to figure out how much damage is done.\n" +
  45. "Answer:");
  46.  
  47.  
  48.  
  49. }
  50. }
  51. public class playerOption {
  52. public void main(String[] args){
  53.  
  54. }
  55.  
  56. }
  57.  
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement