31 lines
730 B
Java
31 lines
730 B
Java
package ch.zhaw.catan;
|
|
|
|
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();
|
|
}
|
|
}
|