Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored CharacterIds into an an enum #728

Merged
merged 1 commit into from
Mar 4, 2012
Merged

Conversation

master-lincoln
Copy link
Collaborator

This replaces the use of some int constants in Art to an enum containing all characters. Only when saving and in network packets I use these constants (now the ordinals of the entry in the enum, I kept the order)

danielduner added a commit that referenced this pull request Mar 4, 2012
Refactored CharacterIds into an an enum
@danielduner danielduner merged commit ce3bfe8 into develop Mar 4, 2012
@danielduner
Copy link
Contributor

You could explicitly give each character a number, using an Enum constructor:
http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html

@master-lincoln
Copy link
Collaborator Author

Yes I know...but I thought this would be overcomplicated since we already have the ordinals anyway...

But I thought about using an enum constructor for giving each character a sex (for the scream when falling) ie male/female
Added a TODO at the appropriate place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants