Is this:

A)

while (!isLegal(move, board))

the same thing as:

B)

while (isLegal(move,board) = !!)

?

There is no such thing as = !!. What you want is != 0

Example A's parameter is saying "while this function returns false..." Right?

Does !=0 mean false?

That means true. You're saying if it is not equal to zero, which is true.
(variable==0) means while it is false or (variable==false) means while it is false

Yes, I actually had the statement backwords -- should have been == 0 as previously noted.

The not operator ! means 0, not false. There is no requirement for false to be 0.

Cool. Got it thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.