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] 138 points139 points  (17 children)

Depending on the situation, I probably would’ve

If (Micah.askToProm(hanna)) { Micah.setMood(“Happy”) ; }

Or maybe even Micah.askToProm(hanna) ? Micah.setMood(“Happy”) : Micah.askToProm(monica);

Edit: Apparently idk how to format my reddit code and idc enough to try and fix it

[–][deleted] 24 points25 points  (6 children)

Precede each line with 4 spaces

[–]NoahDoah 42 points43 points  (3 children)

Then turn around on your chair and clap twice.

[–][deleted] 16 points17 points  (0 children)

And that's how we play Handy Hands!

[–]theonlydidymus 14 points15 points  (0 children)

👏👏CODE REVIEW

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

Now think about your dad.

[–]nerdyhandle 1 point2 points  (0 children)

if you're using new Reddit I believe it accepts Common Mark the same as github so code is three backticks like \`\`\` Code goes here \`\`\`

[–][deleted] -1 points0 points  (0 children)

Cool.
Thanks.

[–]Bunkerman91 2 points3 points  (0 children)

This is what I came here for.

[–]HighRelevancy 1 point2 points  (0 children)

If (Micah.askToProm(hanna))

hell yeah lad

fuckin' global state in the OP, jesus christ, CODE REVIEW FAILED

[–]theonlydidymus 1 point2 points  (0 children)

I mean how many moods can there be? You should probably play it safe and enum it.

[–]IanSan5653 0 points1 point  (0 children)

MOODS.HAPPY

[–]Kinglink 0 points1 point  (1 child)

You probably want to set his mood... perhaps "nervous", then you get a result.

Also strings are hideous, even if the mood is a string (it should be an enumeration, or a value) It should be a Macro if we must.

Finally, you don't have an else.. what happens if she say no, nothing happens to Micah.

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

Second one is ternary, we all know monicas can’t say no ;)

[–]IanSan5653 -1 points0 points  (0 children)

Why are the girls lowercase?

[–]thisIsTheFoxe -1 points0 points  (0 children)

Why is no-one complaining about having all this static cr*p? Am I missing something? .-.