Check your if statements to ensure you have == where required.

For example:

if (condition = true) {
result = true;
}

should be

if (condition == true) {
result = true;
}