Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPraduman .
1,963 Pointsdetermining if the game is solved....I can not figure it out day
Hey, did any body knows the answer of this question ,,, determining if the game is solved....I can not figure it out day
1 Answer
Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 PointsHello, what they are asking for is to use operators to see if the game is solved, the first blank should be an operator to determine if remaining tries is greater than 0;
so remainingTries > 0; would do that trick.
They next want to make sure if the dunktank is already dunked, to make sure that it is not we can add an exclamation point in front of it, not in java. So, !dunkTank.isDunked();
would do that trick, next to make sure both of these conditions are true you combine then with an and statement or && in java.
it total it should look like this.
while (remainingTries > 0 && !dunkTank.isDunked());
filling in the blanks from left to right is >, &&, and !
Thanks let me know if this helps.
Praduman .
1,963 PointsPraduman .
1,963 Pointsthank you ,,, Rob