Advertisement
Guest User

Untitled

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