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

Certain variables have public access #4

Open
hiniko opened this issue May 2, 2012 · 1 comment
Open

Certain variables have public access #4

hiniko opened this issue May 2, 2012 · 1 comment

Comments

@hiniko
Copy link
Owner

hiniko commented May 2, 2012

This mean that users can set this variable in their code and cheat in a spectacular way. For example energy = 500; in a users code will make sure the ant never dies. The same can be done with Colony energy variables.

All protected variables in the ant class need review and colony variables will need to be made private and have getter and setters.

hiniko added a commit that referenced this issue May 3, 2012
It should be noted that World factories are visible and accessible by
Ants. This need to change in such a way that other classes can access
the factories without the Ants being able to.
@hiniko
Copy link
Owner Author

hiniko commented May 3, 2012

This still needs works as Players can code ants that set object factories to null effectively crashing the game. However the obvious energy = 1000; problems are gone

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

No branches or pull requests

1 participant