public static boolean checkGuess(String getGuess, double getBet){
double num = Math.round(Math.random()*10);
boolean correctSide = false;
if (num <=5 && getGuess.equals("H")){
correctSide = true;
} else if (num >=6 && getGuess.equals("T")){
correctSide = true;
} else {
correctSide = false;
}
updateBal(correctSide, getBet);
return correctSide;
}
出于某种原因,这总是返回 true。任何想法为什么?