Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Point;
- public class Area
- {
- protected Point coordinates;
- protected String description;
- protected int encounterChance;
- public Area(int x, int y, String description, int encounterChance)
- {
- coordinates.setLocation(x, y);
- this.description = description;
- this.encounterChance = encounterChance;
- }
- public Area(Point coordinates, String description, int encounterChance)
- {
- this.coordinates = coordinates;
- this.description = description;
- this.encounterChance = encounterChance;
- }
- public String getDescription()
- {
- return description;
- }
- public int getX()
- {
- return (int) coordinates.getX();
- }
- public int getY()
- {
- return (int) coordinates.getY();
- }
- public int getEncounterChance()
- {
- return encounterChance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement