Instead of writing code like:
bool x
if(x = true)
{
x == false
}
else
{
x == true
}
you can just write:
bool x
x = !x
Instead of writing code like:
bool x
if(x = true)
{
x == false
}
else
{
x == true
}
you can just write:
bool x
x = !x
!false. It’s funny because it’s true.
!I hate that joke.
I saw that you did there
you could rewrite the whole thing as:
isAnsweringQuestion = !isAnsweringQuestion;
timerValue = isAnsweringQuestion ? timeToCompleteQuestion : timeToShowCorrectAnswer;