| Line | |
|---|
| 1 |
|
|---|
| 2 | public class Location {
|
|---|
| 3 | private Land land;
|
|---|
| 4 | private Structure structure;
|
|---|
| 5 |
|
|---|
| 6 | public Location(Land land, Structure structure) {
|
|---|
| 7 | this.land = land;
|
|---|
| 8 | this.structure = structure;
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | public Land getLand() {
|
|---|
| 12 | return land;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | public Structure getStruct() {
|
|---|
| 16 | return structure;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | public void setLand(Land type) {
|
|---|
| 20 | land = type;
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | public void setStruct(Structure type) {
|
|---|
| 24 | structure = type;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | public boolean isPassable() {
|
|---|
| 28 | return land.isPassable() && structure.isPassable();
|
|---|
| 29 | }
|
|---|
| 30 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.