Finished Class City (Cleanup and Javadoc)
This commit is contained in:
		
							parent
							
								
									9bb4550926
								
							
						
					
					
						commit
						74e19ad416
					
				| 
						 | 
				
			
			@ -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();
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue