package eu.jonahbauer.wizard.core.states.round;

import eu.jonahbauer.wizard.core.states.GameData;
import eu.jonahbauer.wizard.core.states.GameState;

import java.util.UUID;

import static eu.jonahbauer.wizard.core.states.GameData.*;

public abstract class RoundState extends GameState {
    public static GameData requirements(GameData data) {
        return data.require(PLAYERS, ROUND, SCORE);
    }

    public RoundState(GameData data) {
        super(requirements(data));
    }

    protected UUID getDealer() {
        return getPlayer(get(ROUND) % getPlayerCount());
    }
}
