mercredi 2 août 2017

Java: Conditions Evaluate to "always true" or "always false" [duplicate]

This question already has an answer here:

public static void scoreCount () {

    if(playerWon && botWon = false) {
        playerScore++;
    } else  if (playerWon = false && botWon){
        botScore++;
    }


}

For the first if statement, it says "variable expected" for playerWon and botWon. For the second if statement, it says that the condition will always evaluate to false. Any ideas as to why? Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire