From 99eab9ad69f71ed607099c5c1b80ad6806ea1189 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 9 Dec 2021 19:29:00 +0100 Subject: [PATCH] updates in JavaDoc --- src/ch/zhaw/catan/Player.java | 3 +-- src/ch/zhaw/catan/Road.java | 21 ++++++++++++++++++++- src/ch/zhaw/catan/SiedlerBoard.java | 3 ++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/ch/zhaw/catan/Player.java b/src/ch/zhaw/catan/Player.java index c3921d5..fb74e2f 100644 --- a/src/ch/zhaw/catan/Player.java +++ b/src/ch/zhaw/catan/Player.java @@ -5,7 +5,6 @@ import java.util.List; //TODO Java Doc /** - * New Class PLayer * 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. */ @@ -16,7 +15,7 @@ public class Player { private final HashMap structureToUse; /** - * The constructor creates a new instance of the player class that initializes the Hashmap resources and structureToUse. + * The constructor initializes the faction and the Hashmaps resources and structureToUse. * * @param faction this is the faction of the player. */ diff --git a/src/ch/zhaw/catan/Road.java b/src/ch/zhaw/catan/Road.java index 2590fde..6542231 100644 --- a/src/ch/zhaw/catan/Road.java +++ b/src/ch/zhaw/catan/Road.java @@ -3,21 +3,40 @@ package ch.zhaw.catan; import java.awt.*; /// TODO: 09/12/2021 Java Doc + +/** + * sub Class of Structure + * Can be saved in Siedler Board on Edges. + */ public class Road extends Structure { + //the coordinates of the start and the end Point of the road. private final Point start, end; - + /** + * Constructor of Road + * @param faction The faction of the owner + * @param start the coordinates of the start Point + * @param end the coordinates of the End Point + */ public Road(Config.Faction faction, Point start, Point end) { super(faction); this.start = start; this.end = end; } + /** + * + * @return the coordinates of the start Point + */ public Point getStart() { return start; } + /** + * + * @return the coordinates of the end Point + */ public Point getEnd() { return end; } diff --git a/src/ch/zhaw/catan/SiedlerBoard.java b/src/ch/zhaw/catan/SiedlerBoard.java index e4590cc..cb074ce 100644 --- a/src/ch/zhaw/catan/SiedlerBoard.java +++ b/src/ch/zhaw/catan/SiedlerBoard.java @@ -138,7 +138,8 @@ public class SiedlerBoard extends HexBoard factionList) { List corners = getCorners();