package bagaturchess.bitboard.tests.bughouse;

import static org.junit.jupiter.api.Assertions.assertEquals;
import bagaturchess.bitboard.bughouse.PositionsComparator;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;

public class PositionsComparatorTests {

    @BeforeEach
    public void setUpTakeMove() {

    }

    @Test
    public void testDifference() {
        PositionsComparator comparator = new PositionsComparator("rnbqkbnr/pppp1ppp/8/4p3/3P4/8/PPP1PPPP/RNBQKBNR w KQkq - 0 2",
                "rnbqkbnr/pppp1ppp/8/4P3/8/8/PPP1PPPP/RNBQKBNR b KQkq - 0 2");
        assertEquals(comparator.getPieceIfTakeMove(), 'p');
        PositionsComparator comparatorMiddleGame =
                new PositionsComparator("r1b1nrk1/pp1qnppp/3b4/2pPp3/4P3/2N2NP1/PP3PBP/R1BQ1RK1 w - - 1 12",
                "r1b1nrk1/pp1qnppp/3b4/2pPN3/4P3/2N3P1/PP3PBP/R1BQ1RK1 b - - 0 12");
        assertEquals(comparatorMiddleGame.getPieceIfTakeMove(), 'p');
        comparatorMiddleGame.compareTwoPositions("r1b1nrk1/pp1qnppp/3b4/2pPN3/4P3/2N3P1/PP3PBP/R1BQ1RK1 b - - 0 12",
                "r1b1nrk1/pp1qnppp/8/2pPb3/4P3/2N3P1/PP3PBP/R1BQ1RK1 w - - 0 13");
        assertEquals(comparatorMiddleGame.getPieceIfTakeMove(), 'N');
    }
}
