////////////////////////////////////////
// Programming project code
// UniBw M, 2022, 2023, 2024
// www.unibw.de/inf2
// (c) Mark Minas (mark.minas@unibw.de)
////////////////////////////////////////

package pp.monopoly.game.client;

import java.io.File;

import pp.monopoly.MonopolyConfig;

/**
 * Class providing access to the Monopoly client configuration.
 * Extends {@link MonopolyConfig} to include additional properties specific to the client.
 * This class manages configuration settings related to the RobotClient's behavior
 * and the game maps used in single mode.
 * <p>
 * <b>Note:</b> Attributes of this class should not be marked as {@code final}
 * to ensure proper functionality when reading from a properties file.
 * </p>
 */
public class MonopolyClientConfig extends MonopolyConfig {

    /**
     * Path to the file representing the map.
     */
    @Property("map")
    private String map;


    /**
     * Creates a default {@code MonopolyClientConfig} with predefined values.
     */
    public MonopolyClientConfig() {
        // Default constructor
    }

    /**
     * Returns the file representing the opponent's map.
     *
     * @return the opponent's map file, or {@code null} if not set.
     */
    public File getMap() {
        return map == null ? null : new File(map);
    }
}
