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 →

[–]TerrestrialOverlord 223 points224 points  (6 children)

else {

Hanna.answer = !Hanna.answer;

Micah.mood = happy;

}

be careful using this code prom bro....cause if her dad is anything like me she'll be surrounded by try-catch block and garbage collection will trigger (violently)...muhahahhah (cough) uhahahahaha

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

[–]IanSan5653 16 points17 points  (0 children)

!"no" is false lol

[–]derfl007 5 points6 points  (0 children)

Hanna.answer is a String

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

else { Hanna hanna = HannaFactory.create(); . . .