package com.trunksbomb.minetriad.game;

import java.util.List;

import net.minecraft.resources.ResourceLocation;

public record MoveResult(
        boolean valid,
        String errorMessage,
        List<BoardCell> capturedCells,
        List<String> battleLog,
        String playedCardName,
        ResourceLocation playedCardId,
        BoardCell playedCell) {
    public static MoveResult success(
            List<BoardCell> capturedCells,
            List<String> battleLog,
            String playedCardName,
            ResourceLocation playedCardId,
            BoardCell playedCell) {
        return new MoveResult(true, "", List.copyOf(capturedCells), List.copyOf(battleLog), playedCardName, playedCardId, playedCell);
    }

    public static MoveResult failure(String errorMessage) {
        return new MoveResult(false, errorMessage, List.of(), List.of(), "", null, null);
    }
}
