From 828218023fa64ee3370bc064f01fc542ca59c96a Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 10 Dec 2021 10:57:28 +0100 Subject: [PATCH] Javadoc Player --- .idea/codeStyles/Project.xml | 11 +++++++++++ src/ch/zhaw/catan/Command.java | 3 ++- src/ch/zhaw/catan/Player.java | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .idea/codeStyles/Project.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..fb9db83 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/src/ch/zhaw/catan/Command.java b/src/ch/zhaw/catan/Command.java index 8b5b103..3c0d40f 100644 --- a/src/ch/zhaw/catan/Command.java +++ b/src/ch/zhaw/catan/Command.java @@ -1,8 +1,9 @@ package ch.zhaw.catan; - /** + * This enum is used to define the Commandwords. * + * @author Leonardo Brandenberger */ public enum Command { NEXT_PLAYER("next player"), BUILD_SETTLEMENT("build settlement"), BUILD_CITY("build city"), diff --git a/src/ch/zhaw/catan/Player.java b/src/ch/zhaw/catan/Player.java index fb74e2f..dc1f8a8 100644 --- a/src/ch/zhaw/catan/Player.java +++ b/src/ch/zhaw/catan/Player.java @@ -2,11 +2,12 @@ package ch.zhaw.catan; import java.util.HashMap; 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, * 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 { @@ -112,7 +113,6 @@ public class Player { * @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. */ - //returns true if player has enough resources else false private boolean checkResourceToBuild(List list) { HashMap costs = new HashMap<>(); for (Config.Resource resource : list) {