Commit f41f61a3 authored by Mamadou Saliou DIALLO's avatar Mamadou Saliou DIALLO
Browse files

feat: create colored artefact cards

parent 83e858f4
package fr.univnantes.alma.model.card.place;
import fr.univnantes.alma.model.BoardGame;
/**
* Artefact place card.
*/
public class ArtefactCard extends BasicPlaceCard {
public abstract class ArtefactCard extends BasicPlaceCard {
/**
* Card number.
......@@ -17,18 +15,25 @@ public class ArtefactCard extends BasicPlaceCard {
*/
private static final String CARD_NAME = "L'artefact";
/**
* Card color.
*/
private ArtefactColor color;
/**
* Create new instance of artefact card.
* @param cardColor Card color.
*/
public ArtefactCard() {
public ArtefactCard(ArtefactColor cardColor) {
super(CARD_NUMBER, CARD_NAME);
color = cardColor;
}
/**
* {@inheritdoc}
* Return card color.
* @return Artefact card color.
*/
@Override
public void applyEffect(final BoardGame boardGame) {
public ArtefactColor getColor() {
return color;
}
}
package fr.univnantes.alma.model.card.place;
/**
* Color of artefact card.
*/
public enum ArtefactColor {
/**
* Blue artefact card.
*/
BLUE,
/**
* Red artefact card.
*/
RED,
/**
* Green artefact card.
*/
GREEN,
/**
* Yellow artefact card.
*/
YELLOW
}
package fr.univnantes.alma.model.card.place;
import fr.univnantes.alma.model.BoardGame;
/**
* Blue artefact card.
*/
public class BlueArtefactCard extends ArtefactCard {
/**
* Card color.
*/
private static final ArtefactColor COLOR = ArtefactColor.BLUE;
/**
* Create new instance of blue artefact card.
*/
public BlueArtefactCard() {
super(COLOR);
}
/**
* {@inheritdoc}
*/
@Override
public void applyEffect(final BoardGame boardGame) {
}
}
package fr.univnantes.alma.model.card.place;
import fr.univnantes.alma.model.BoardGame;
/**
* Green artefact card.
*/
public class GreenArtefactCard extends ArtefactCard {
/**
* Card color.
*/
private static final ArtefactColor COLOR = ArtefactColor.GREEN;
/**
* Create new instance of green artefact card.
*/
public GreenArtefactCard() {
super(COLOR);
}
/**
* {@inheritdoc}
*/
@Override
public void applyEffect(final BoardGame boardGame) {
}
}
package fr.univnantes.alma.model.card.place;
import fr.univnantes.alma.model.BoardGame;
/**
* Red artefact card.
*/
public class RedArtefactCard extends ArtefactCard {
/**
* Card color.
*/
private static final ArtefactColor COLOR = ArtefactColor.RED;
/**
* Create new instance of red artefact card.
*/
public RedArtefactCard() {
super(COLOR);
}
/**
* {@inheritdoc}
*/
@Override
public void applyEffect(final BoardGame boardGame) {
}
}
package fr.univnantes.alma.model.card.place;
import fr.univnantes.alma.model.BoardGame;
/**
* Yellow artefact card.
*/
public class YellowArtefactCard extends ArtefactCard {
/**
* Card color.
*/
private static final ArtefactColor COLOR = ArtefactColor.YELLOW;
/**
* Create new instance of yellow artefact card.
*/
public YellowArtefactCard() {
super(COLOR);
}
/**
* {@inheritdoc}
*/
@Override
public void applyEffect(final BoardGame boardGame) {
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment