Created
October 23, 2011 21:44
-
-
Save strangeglyph/1307923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FoodEntity extends Entity { | |
//The size of the entiy | |
public int size; | |
public FoodEntity() { | |
size = r.nextInt(100); | |
spawn(); //Warning: Overridable method call in constructor | |
} | |
public void spawn() { | |
this.x = r.nextInt(100); | |
this.y = r.nextInt(100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment