/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package frame;

import java.util.Collection;

/**
 *
 * @author Ani
 */
public abstract class Gamestate {
    protected Player player;
    protected static Collection<Operator> operators;


    public Player getPlayer() {
        return player;
    }

    public static Collection<Operator> getOperators() {
        return operators;
    }

    public void changeNextPlayer(){
        player.changePlayer();
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Gamestate)){
            return false;
        }
        Gamestate state = (Gamestate) obj;
        return this.player.equals(state.player) && this.operators.equals(state.operators);
    }

    public abstract boolean isUsable(Operator operator) throws NoSuchPlayerException;
    public abstract Gamestate use(Operator operator) throws NoSuchPlayerException;
    public abstract boolean isEndstate();
    public abstract Integer negaMaxAlfaBetaUsefulness();
    public abstract Character winner();



}
