package uebung04;

import java.util.ArrayList;

public abstract class Game {
    
    protected static int counter = 0;
    protected final int id;
    protected String player1 = null;
    protected String player2 = null;
    protected String winner = null;

    protected Game(){
        id = counter;
        counter++;
    }

    public int getId() {return id;}

    protected String getWinner(){return winner;}

    public void setWinner(int player){
        if (player == 1) {
            winner = player1;
        } else if(player == 2){
            winner = player2;
        }
    }

    public abstract String getPlayer1();

    public abstract String getPlayer2();

    public abstract ArrayList<String> getAllPlayers();
}
