Merge remote-tracking branch 'origin/main'

This commit is contained in:
Andrin Fassbind 2021-12-10 10:57:41 +01:00
commit b8fcf85514
2 changed files with 28 additions and 1 deletions

View File

@ -2,24 +2,50 @@ package ch.zhaw.catan;
import ch.zhaw.hexboard.Label;
/**
* Field Class stores Land and Label in Corresponding Field.
*
* @author Roman Schenk
*/
public class Field {
private final Config.Land land;
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) {
this.land = land;
this.label = label;
}
/**
* Returns the Resource type of the field.
*
* @return Config.Resource of the field
*/
public Config.Resource getResource() {
return land.getResource();
}
/**
* Return the Land type of the field.
*
* @return Config.Land of the field
*/
public Config.Land getLand() {
return land;
}
/**
* Return the label of the field.
*
* @return Label of the field
*/
public Label getLabel() {
return label;
}

View File

@ -77,6 +77,7 @@ public class Parser {
gameStartValues.put("NumberOfPlayers", textIO.newIntInputReader().withMinVal(Config.MIN_NUMBER_OF_PLAYERS).withMaxVal(4).read("Number of players:"));
gameStartValues.put("NumberOfWinPoints", textIO.newIntInputReader().withMinVal(5).withMaxVal(15).read("Winpoints needed for Victory:"));
return gameStartValues;
//Todo find out how many max and min Win Points
}
/**
@ -102,7 +103,7 @@ public class Parser {
}
/**
* Outputs which player currently is at turn
* Outputs which player currently is at turn.
*
* @param faction the faction which turn it is
*/