import java.util.*;
public class moraleTest{
public static void main
(String[]args
){ int question = 0;
int morale = 0;
String negativeResponses
[]=
{"fuck off",
"i hate you",
"i dont like you",
"hate"};
String positiveResponses
[]=
{"love",
"i love you",
"i like you",
"you're nice"};
//neutral responses
String negativeQuestions
[]=
{"You're not very nice to me!",
"I dont like you",
"I was just trying to be nice,",
"Fuck off"};
String positiveQuestions
[]=
{"You're very nice to me!",
"I like you",
"You make me happy",
"Love"};
String neutralQuestions
[]=
{"You're neutral to me",
"i nothing you",
"you make me neither happy or sad",
"hmh"};
String hateQuestion
[]=
{"I FUCKING HATE YOU",
"I FUCKING HATE YOU",
"I FUCKING HATE YOU",
"I FUCKING HATE YOU"};
String loveQuestion
[]=
{"I FUCKING LOVE YOU",
"I FUCKING LOVE YOU",
"I FUCKING LOVE YOU",
"I FUCKING LOVE YOU"};
TextIO.putln("This game is about finding the password by getting the 'bot' to like you, go ahead, (H)elp for avaible commands");
TextIO.putln("Hi there!");
String response = TextIO.
getln();
while(true){
int i=0;
if(response.equals("TobAnt")) break;
if(response.equals("h")){
TextIO.putln("\n\n\n[NEGATIVE RESPONSES]");
TextIO.
putln(Arrays.
toString(negativeResponses
));
TextIO.putln("\n\n[POSITIVE RESPONSES]");
TextIO.
putln(Arrays.
toString(positiveResponses
));
TextIO.putln("\n\n\n");
}
for(int x=0; x<negativeResponses.length; x++){
if(response.equals(negativeResponses[x])) morale = morale - 1;
}
for(int x=0; x<positiveResponses.length; x++){
if(response.equals(positiveResponses[x])) morale = morale + 1;
}
question = generator.nextInt(4);
if(morale < 0 && morale > -3){
TextIO.putln("[NEGATIVE]");
TextIO.putln(negativeQuestions[question]);
status = "not liked";
}else if(morale > 0 && morale < 3){
TextIO.putln("[POSITIVE]");
TextIO.putln(positiveQuestions[question]);
status = "liked";
}else if(morale <= -3){
TextIO.putln(hateQuestion[question]);
status = "HATED";
}else if(morale >=3){
TextIO.putln(loveQuestion[question]);
TextIO.putln("Password is: loved");
status = "LOVED";
}else{
TextIO.putln(neutralQuestions[question]);
status = "Neutral";
}
response = TextIO.getln();
TextIO.putln("Status: " + status);
}
TextIO.putln("You won the game!");
}
}