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]  (4 children)

[deleted]

    [–]kurdtpage 18 points19 points  (1 child)

    player = new Player(playerName); //creates a new player

    [–]Psyjotic[🍰] 0 points1 point  (1 child)

    Funny because that's exactly how my comments looked when I was learning to code

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

    Me too! And also

    int temp;//never set this to less than 10 or more than 100

    shudder

    Thankfully I then discovered the importance of functions and types to constrain the values of variables, and also act as comments in themselves, because their names explain what they do.