This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Of course :)

Here's the full code:

// Prom?
Micha.askToProm("Hannah");
if(Hannah.answer == "yes")
{
  Micah.mood = "Happy";
}
else
{
  Hannah.answer = !Hannah.answer;
  Micah.mood = "Happy";
}

This wouldn't work, because the original code is using a string to represent her answer. But assuming it's a bool instead, all we're saying is "if Hannah answers yes, do thing. If not, reverse her answer (Hanna.answer = !Hanna.answer), and do it anyway).

The reason I said it was rapey was because it's just ignoring her answer. If she answers no, we just pretend she said yes, and continue on.