fork download
  1. import java.util.Scanner.*;
  2. import java.util.*;
  3. import java.lang.*;
  4. import java.io.*;
  5.  
  6. public class eet {
  7. public static void main(String []args) {
  8.  
  9. Scanner keyboard = new Scanner(System.in);
  10.  
  11. String name;
  12.  
  13. System.out.println("What is your name?");
  14. name = keyboard.next();
  15.  
  16. System.out.println("I hope you're not as garbage as the last player, " + name);
  17.  
  18. System.out.println("What stats do you want, " + name);
  19. System.out.println("and you BETTER NOT go above 8 points");
  20. System.out.println("Speed-->");
  21. int speed = keyboard.nextInt();
  22. int left = 8 - speed;
  23. System.out.println("Really?" + speed + " Speed? That's weak. You only got " + left + " points left...");
  24. System.out.println("Next is Attack, " + name + ". -->");
  25. int attack = keyboard.nextInt();
  26. System.out.println("Last but not least, defense. -->");
  27. int defense = keyboard.nextInt();
  28.  
  29. int all = attack + speed + defense;
  30.  
  31. if(all>9)
  32. {
  33. System.out.println(name + ", I knew you were a dirty scoundrel. I said 8 points, not " + all + ".");
  34. System.exit(0);
  35. }
  36. else {
  37. if(all<9);
  38. System.out.println(speed + " Speeed, " + defense + " Defense, and " + attack + " Attack? Sounds trashy. By the way you have 10HP, along with your defense.");
  39. }
  40. System.out.println("Anyway, would you like to go Right or Left, '1' and '2' respectively?");
  41.  
  42. String lorR = keyboard.next();
  43. if(lorR.equals("1") || lorR.equals("2")){
  44. System.out.println("You moved");
  45. }
  46. String lorR2 = keyboard.next();
  47. if(lorR2.equals("1") || lorR2.equals("2")){
  48. System.out.println("You moved");
  49. }
  50. double jollybee = (Math.random() * 11) + 2;
  51. if(jollybee>2)
  52. {
  53. System.out.println("A monster walks up to you. it has 3 ATTACK, 1 DEFENSE, and 1 SPEED. Do you 1. Attack, or 2. Run AwaY?");
  54.  
  55.  
  56. }
  57. String stringit = keyboard.next();
  58. int int1 = Integer.parseInt(stringit);
  59. int run = 1;
  60. int attackit = 2;
  61.  
  62. if(int1<2)
  63. {
  64. System.out.println("You decide to take down the massive thing. It almost kills you, but you break its legs.");
  65. System.out.println("You are left with 1 HP");
  66. }
  67. else {
  68. if (int1>1)
  69. System.out.println("You try to run, but its speed greatly outweighs yours. it bites off your head as soon as you turn around.");
  70. System.exit(0);
  71. }
  72.  
  73. }
  74.  
  75. }
  76.  
  77.  
  78.  
  79.  
  80.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:6: error: class eet is public, should be declared in a file named eet.java
public class eet {
       ^
1 error
stdout
Standard output is empty