package org.luxons.sevenwonders.game.cards;

import org.luxons.sevenwonders.game.boards.Board;
import org.luxons.sevenwonders.game.effects.Effect;

public class Card {

    private final String name;

    private final Color color;

    private final Requirements requirements;

    private final Effect effect;

    public Card(String name, Color color, Requirements requirements, Effect effect) {
        this.name = name;
        this.color = color;
        this.requirements = requirements;
        this.effect = effect;
    }

    public String getName() {
        return name;
    }

    public Color getColor() {
        return color;
    }

    public Requirements getRequirements() {
        return requirements;
    }

    public Effect getEffect() {
        return effect;
    }

    public void play(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard) {
        board.addCard(this);
        requirements.pay(board);
        effect.apply(board, leftNeighbourBoard, rightNeighbourBoard);
    }

    @Override
    public String toString() {
        return "Card{" + "name='" + name + '\'' + ", color=" + color + ", requirements=" + requirements + ", effect="
                + effect + '}';
    }
}

@@ -38,16 +38,40 @@
 cards;%0A%0A
+import java.util.List;%0A%0A
 import o
@@ -314,29 +314,36 @@
 e final 
+List%3C
 Effect
+%3E
  effect
+s
 ;%0A%0A    p
@@ -410,21 +410,28 @@
 ts, 
+List%3C
 Effect
+%3E
  effect
+s
 ) %7B%0A
@@ -545,16 +545,17 @@
 s.effect
+s
  = effec
@@ -551,24 +551,25 @@
 cts = effect
+s
 ;%0A    %7D%0A%0A   
@@ -773,22 +773,28 @@
  public 
+List%3C
 Effect
+%3E
  getEffe
@@ -795,16 +795,17 @@
 etEffect
+s
 () %7B%0A   
@@ -822,16 +822,17 @@
 n effect
+s
 ;%0A    %7D%0A
@@ -997,16 +997,32 @@
   effect
+s.forEach(e -%3E e
 .apply(b
@@ -1063,24 +1063,25 @@
 ghbourBoard)
+)
 ;%0A    %7D%0A%0A   
@@ -1237,16 +1237,17 @@
 , effect
+s
 =%22%0A     
@@ -1265,16 +1265,17 @@
 + effect
+s
  + '%7D';%0A

Add multiple effects support for cards