Finished Class Field (Cleanup and Javadoc)
This commit is contained in:
parent
211c2fda63
commit
792944a7ce
|
@ -2,24 +2,50 @@ package ch.zhaw.catan;
|
||||||
|
|
||||||
import ch.zhaw.hexboard.Label;
|
import ch.zhaw.hexboard.Label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field Class stores Land and Label in Corresponding Field.
|
||||||
|
*
|
||||||
|
* @author Roman Schenk
|
||||||
|
*/
|
||||||
public class Field {
|
public class Field {
|
||||||
|
|
||||||
private final Config.Land land;
|
private final Config.Land land;
|
||||||
private final Label label;
|
private final Label label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs field object that stores land and label object in Field.
|
||||||
|
*
|
||||||
|
* @param land that will be stored in Field
|
||||||
|
* @param label that will be stored in Field
|
||||||
|
*/
|
||||||
public Field(Config.Land land, Label label) {
|
public Field(Config.Land land, Label label) {
|
||||||
this.land = land;
|
this.land = land;
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Resource type of the field.
|
||||||
|
*
|
||||||
|
* @return Config.Resource of the field
|
||||||
|
*/
|
||||||
public Config.Resource getResource() {
|
public Config.Resource getResource() {
|
||||||
return land.getResource();
|
return land.getResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the Land type of the field.
|
||||||
|
*
|
||||||
|
* @return Config.Land of the field
|
||||||
|
*/
|
||||||
public Config.Land getLand() {
|
public Config.Land getLand() {
|
||||||
return land;
|
return land;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the label of the field.
|
||||||
|
*
|
||||||
|
* @return Label of the field
|
||||||
|
*/
|
||||||
public Label getLabel() {
|
public Label getLabel() {
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue