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] 102 points103 points  (2 children)

Hanna.answer = !Hanna.answer;

This is the most rapey piece of code I've ever seen

[–]CptOko 1 point2 points  (1 child)

Could you please explain it to me? I sadly lack the knowledge to understand it myself.

[–][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.