package org.academiadecodigo.bootcamp11.pokemon.map.city;

import org.academiadecodigo.bootcamp11.pokemon.trainer.MainCharacter;
import org.academiadecodigo.bootcamp11.pokemon.trainer.Trainer;

/**
 *  Each city has a name.
 *  You can play every city.
 *  You can find enemies in cities.
 */

public abstract class City {

    private boolean cleared;
    private String name;
    private Trainer[] opponents;

    public City(String name) {
        this.cleared = false;
        this.name = name;
    }

    public boolean isCleared() {
        return cleared;
    }

    public void setCleared() {
        this.cleared = true;
    }

    public String getName() {
        return name;
    }

    public abstract void play(MainCharacter character);

    public String getWelcome() {
        return "Welcome to " + getName() + "!";
    }

    @Override
    public String toString() {
        return String.format("[%s] %s", (isCleared() ? "X" : " "), getName());
    }
}
