Javadoc Player
This commit is contained in:
parent
211c2fda63
commit
828218023f
|
@ -0,0 +1,11 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<JavaCodeStyleSettings>
|
||||||
|
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||||
|
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||||
|
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
</JavaCodeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
|
@ -1,8 +1,9 @@
|
||||||
package ch.zhaw.catan;
|
package ch.zhaw.catan;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This enum is used to define the Commandwords.
|
||||||
*
|
*
|
||||||
|
* @author Leonardo Brandenberger
|
||||||
*/
|
*/
|
||||||
public enum Command {
|
public enum Command {
|
||||||
NEXT_PLAYER("next player"), BUILD_SETTLEMENT("build settlement"), BUILD_CITY("build city"),
|
NEXT_PLAYER("next player"), BUILD_SETTLEMENT("build settlement"), BUILD_CITY("build city"),
|
||||||
|
|
|
@ -2,11 +2,12 @@ package ch.zhaw.catan;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
//TODO Java Doc
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is here in order to maintain the resources of the players, the amount of structures that they can build,
|
* This class is here in order to maintain the resources of the players, the amount of structures that they can build,
|
||||||
* control to see if a player has enough to build a new structure and to add them into a faction.
|
* control to see if a player has enough to build a new structure and to add them into a faction.
|
||||||
|
*
|
||||||
|
* @author Leonardo Brandenberger, Roman Schrom, Andrin Fassbind, Stefan Amador
|
||||||
*/
|
*/
|
||||||
public class Player {
|
public class Player {
|
||||||
|
|
||||||
|
@ -112,7 +113,6 @@ public class Player {
|
||||||
* @param list the list that shows how many resources are required.
|
* @param list the list that shows how many resources are required.
|
||||||
* @return true if the player has enough resources to build and return false if he doesn't.
|
* @return true if the player has enough resources to build and return false if he doesn't.
|
||||||
*/
|
*/
|
||||||
//returns true if player has enough resources else false
|
|
||||||
private boolean checkResourceToBuild(List<Config.Resource> list) {
|
private boolean checkResourceToBuild(List<Config.Resource> list) {
|
||||||
HashMap<Config.Resource, Integer> costs = new HashMap<>();
|
HashMap<Config.Resource, Integer> costs = new HashMap<>();
|
||||||
for (Config.Resource resource : list) {
|
for (Config.Resource resource : list) {
|
||||||
|
|
Loading…
Reference in New Issue