package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events;

import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Artist;
import it.polimi.ingsw.gc14.Model.Player;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.Arrays;

import static org.junit.jupiter.api.Assertions.*;

class CavePaintingsTest {

    @Test
    void activateEvent() {
        Player p1 = new Player("Marco");

        ArrayList<Player> players = new ArrayList<>(Arrays.asList(p1));
        CavePaintings cp1 = new CavePaintings(1, 1, 3, 2);
        cp1.activateEvent(players);

        assertEquals(-3, p1.getPrestigeValue());
        assertEquals(0, p1.getFoodValue());


        new Artist(1).insert(p1);


        CavePaintings cp2 = new CavePaintings(1, 1, 3, 2);
        cp2.activateEvent(players);

        assertEquals(-1, p1.getPrestigeValue());
        assertEquals(0, p1.getFoodValue());



        new Artist(1).insert(p1);


        CavePaintings cp3 = new CavePaintings(1, 1, 3, 5);
        cp3.activateEvent(players);

        assertEquals(9, p1.getPrestigeValue());
        assertEquals(0, p1.getFoodValue());

    }
}