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

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

import java.util.List;
import java.util.Optional;
import java.util.UUID;

public final class Created extends GameState {
    public Created() {
        super(GameData.EMPTY);
    }

    @Override
    public Optional<GameState> start(Game game, List<UUID> players) {
        return transition(new Starting(GameData.EMPTY.with(GameData.PLAYERS, players)));
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof Created;
    }
}
