Jump to content

What's an Enum [Part-One]


Joseph

Recommended Posts

I just noticed in your example enum, you've capitalized Ten, but not the rest of the numbers. my OCD is killing me.

ss2014-03-26at123229_zps0944f9fe.png

Use the keyword this for get methods for consistency and redundancy, it makes it easier to see which variable you're actually accessing (I know most if not all IDE's will make sure they are the same color anyways).

Lol I'll fix it when I get home

Link to comment
Share on other sites

Plural enums really bother me. I just think they look weird.

public enum Number

This is only true if the fields inside the enum are not bit fields.

I understand where your coming from, but to have to redo all the picture because of one spelling is a bitch

Edited by josedpay
Link to comment
Share on other sites

  • 1 month later...

It might be better if you used runescape related enums.

Such as making an example Magic enum, and passing in the Spell.CAMELOT_TELEPORT or something into it.

That way you can give scripters an area that they'll be able to see its usefulness, and easily integrate it into their scripts.

 

Making an enum for Numbers isn't very useful at first glance. I realize it's an example, but if you put it into runescape terms people might understand how powerful enums can be.

Link to comment
Share on other sites

It might be better if you used runescape related enums.

Such as making an example Magic enum, and passing in the Spell.CAMELOT_TELEPORT or something into it.

That way you can give scripters an area that they'll be able to see its usefulness, and easily integrate it into their scripts.

 

Making an enum for Numbers isn't very useful at first glance. I realize it's an example, but if you put it into runescape terms people might understand how powerful enums can be.

 wink.png  lol alright, ill probably just leave the number enum. but add in a runescape section. 

Edited by josedpay
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...