1.  
  2. import java.util.*;
  3. public class moraleTest{
  4.  
  5. public static void main(String[]args){
  6. Random generator = new Random();
  7. int question = 0;
  8. int morale = 0;
  9.  
  10. String negativeResponses[]={"fuck off", "i hate you", "i dont like you", "hate"};
  11. String positiveResponses[]={"love", "i love you", "i like you","you're nice"};
  12. //neutral responses
  13.  
  14. String negativeQuestions[]={"You're not very nice to me!", "I dont like you", "I was just trying to be nice,", "Fuck off"};
  15. String positiveQuestions[]={"You're very nice to me!", "I like you", "You make me happy", "Love"};
  16. String neutralQuestions[]={"You're neutral to me", "i nothing you", "you make me neither happy or sad", "hmh"};
  17. String hateQuestion[]={"I FUCKING HATE YOU", "I FUCKING HATE YOU","I FUCKING HATE YOU","I FUCKING HATE YOU"};
  18. String loveQuestion[]={"I FUCKING LOVE YOU","I FUCKING LOVE YOU","I FUCKING LOVE YOU","I FUCKING LOVE YOU"};
  19.  
  20. TextIO.putln("This game is about finding the password by getting the 'bot' to like you, go ahead, (H)elp for avaible commands");
  21.  
  22. TextIO.putln("Hi there!");
  23. String response = TextIO.getln();
  24. String status = "Neutral";
  25.  
  26. while(true){
  27. int i=0;
  28.  
  29.  
  30. if(response.equals("TobAnt")) break;
  31. if(response.equals("h")){
  32. TextIO.putln("\n\n\n[NEGATIVE RESPONSES]");
  33. TextIO.putln(Arrays.toString(negativeResponses));
  34. TextIO.putln("\n\n[POSITIVE RESPONSES]");
  35. TextIO.putln(Arrays.toString(positiveResponses));
  36. TextIO.putln("\n\n\n");
  37.  
  38.  
  39.  
  40. }
  41. for(int x=0; x<negativeResponses.length; x++){
  42.  
  43. if(response.equals(negativeResponses[x])) morale = morale - 1;
  44.  
  45. }
  46. for(int x=0; x<positiveResponses.length; x++){
  47.  
  48. if(response.equals(positiveResponses[x])) morale = morale + 1;
  49.  
  50. }
  51.  
  52.  
  53.  
  54. question = generator.nextInt(4);
  55. if(morale < 0 && morale > -3){
  56. TextIO.putln("[NEGATIVE]");
  57. TextIO.putln(negativeQuestions[question]);
  58. status = "not liked";
  59. }else if(morale > 0 && morale < 3){
  60. TextIO.putln("[POSITIVE]");
  61. TextIO.putln(positiveQuestions[question]);
  62. status = "liked";
  63.  
  64. }else if(morale <= -3){
  65.  
  66. TextIO.putln(hateQuestion[question]);
  67. status = "HATED";
  68.  
  69. }else if(morale >=3){
  70.  
  71.  
  72. TextIO.putln(loveQuestion[question]);
  73. TextIO.putln("Password is: loved");
  74. status = "LOVED";
  75.  
  76. }else{
  77. TextIO.putln(neutralQuestions[question]);
  78. status = "Neutral";
  79.  
  80.  
  81. }
  82.  
  83. response = TextIO.getln();
  84. TextIO.putln("Status: " + status);
  85. }
  86.  
  87. TextIO.putln("You won the game!");
  88.  
  89. }
  90.  
  91. }