From 74e19ad416c4e8675a14f87ac740d7b18178271b Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Fri, 10 Dec 2021 10:38:01 +0100 Subject: [PATCH] Finished Class City (Cleanup and Javadoc) --- src/ch/zhaw/catan/City.java | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ch/zhaw/catan/City.java b/src/ch/zhaw/catan/City.java index c816ad8..a3bcd2d 100644 --- a/src/ch/zhaw/catan/City.java +++ b/src/ch/zhaw/catan/City.java @@ -1,13 +1,29 @@ package ch.zhaw.catan; -import java.awt.Point; +import java.awt.*; +/** + * City Class Subclass of Structure to hold city at desired point. + * + * @author Andrin Fassbind + */ public class City extends Settlement { - + /** + * Constructs a City Object and the desired Position with the desired Faction. + * + * @param faction of the player + * @param position where the city will be placed + */ public City(Config.Faction faction, Point position) { super(faction, position); } + /** + * Overrides toString method to show faction name in uppercase. + * + * @return String Faction in uppercase + */ + @Override public String toString() { return super.getFaction().toString().toUpperCase(); }