Hey I am trying to created a dice game that roll the dice twice and then ask the user if he/she thinks the next two rolls will be more than or less than the first two. After the third roll the program is then suppose to ask the user if he/she would like to change her guess. Then after the fourth row the output is suppose to either say "you won" or "you lost." I can't seem to figure out how to get the machine to print out more than or less than and to accept the different words of "MORE," or "more,"or "m," or "M" all for the more than value. I also need help when it comes to asking the user if he/she would like to change his/her guess and how to set this up. I appreciate your help. Here is my code so far.
import java.util.Scanner;
public class DiceGame2
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int aRandomNumber, resultOne, resultTwo;
String moreThan, lessThan, userInput, userInput2, userInput3;
aRandomNumber = (int) (Math.random()*6) + 1;{
System.out.println(aRandomNumber);
System.out.println(aRandomNumber);
resultOne = (aRandomNumber + aRandomNumber);
System.out.println("Will the sum of the next two rolls be more than "+
"or less than " + resultOne+"?");
userInput = keyboard.nextLine();
System.out.println("Your third roll was "+ aRandomNumber +". Do you want"
+" to change your guess?");
userInput2 = keyboard.nextLine();
resultTwo = (aRandomNumber + aRandomNumber);
System.out.println("Your fourth roll is "+ aRandomNumber +". Your second "
+"total is "+resultTwo +".");
}
}
}