/**
 * This class is an Object that is used to represent a single Tile on the playing Board.
 */
public class Tile {

    /**
     * These Values are being set when initialized
     */
    int owner = -1;

    /**
     * Initializer for Tile Objects 
     */
    public Tile(){}

    /**
     * Lets you set a new owner;
     * -1 = no one; 0 = Player 1; 1 = Player 2
     * @param owner
     */
    public void setOwner(int player){
        owner = player;
    }

    /**
     * Returns the owner
     * -1 = no one; 0 = Player 1; 1 = Player 2
     * @return owner
     */
    public int getOwner(){
        return owner;
    }

    /**
     * Returns if the Tile-owner is equal to the given Player
     * @param owner
     */
    public boolean isOwner(int player){
        return owner == player;
    }

    /**
     * Whether this Tile is owned by a Player
     */
    public boolean existOwner(){
        return owner != -1;
    }

}