Minor Grammar and Cameltow fixes
This commit is contained in:
@@ -2,7 +2,7 @@ package ch.zhaw.catan;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
//TODO Java Doc bearbeiten
|
||||
/**
|
||||
* New Class PLayer
|
||||
* This class is here in order to maintain the resources of the players, the amount of structures that they can build,
|
||||
@@ -10,9 +10,9 @@ import java.util.List;
|
||||
*/
|
||||
public class Player {
|
||||
|
||||
private Config.Faction faction;
|
||||
private HashMap<Config.Resource, Integer> resources;
|
||||
private HashMap<Config.Structure, Integer> structureToUse;
|
||||
private final Config.Faction faction;
|
||||
private final HashMap<Config.Resource, Integer> resources;
|
||||
private final HashMap<Config.Structure, Integer> structureToUse;
|
||||
|
||||
/**
|
||||
* The constructor creates a new instance of the player class that initializes the Hashmap resources and structureToUse.
|
||||
@@ -63,7 +63,7 @@ public class Player {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method adds a specific resource to resourcess
|
||||
* This method adds a specific resource to resources
|
||||
*
|
||||
* @param resource to add
|
||||
* @param numberToAdd how much to add
|
||||
@@ -90,7 +90,7 @@ public class Player {
|
||||
|
||||
/**
|
||||
* This method has to be used when a player wants to build a structure. It checks if a player has enough of the specific structure
|
||||
* and resources to build one more. If the player is able to build, this method subtracts the buildcost from the resources
|
||||
* and resources to build one more. If the player is able to build, this method subtracts the building cost from the resources
|
||||
* in possession by the player.
|
||||
* It reduces the amount of the specific structure a player can build by 1.
|
||||
* @return true if the structure can be created false if the structure can't be created.
|
||||
|
||||
Reference in New Issue
Block a user