Added 'Visitor' interface.

Added the 'Visitor' interface to this project. It will be used to handle all types of power cards.
This commit is contained in:
Daniel Grigencha
2024-12-05 23:54:55 +01:00
parent 421231aa12
commit 1e46b1dc59

View File

@@ -0,0 +1,39 @@
package pp.mdga.visitor;
import pp.mdga.game.card.HiddenCard;
import pp.mdga.game.card.ShieldCard;
import pp.mdga.game.card.SwapCard;
import pp.mdga.game.card.TurboCard;
/**
* This interface will be used to realize the visitor pattern inside the application.
*/
public interface Visitor {
/**
* This method will be used to visit the given card parameter.
*
* @param card as a TurboCard object.
*/
void visit(TurboCard card);
/**
* This method will be used to visit the given card parameter.
*
* @param card as a SwapCard object.
*/
void visit(SwapCard card);
/**
* This method will be used to visit the given card parameter.
*
* @param card as a ShieldCard oblect
*/
void visit(ShieldCard card);
/**
* This method will be used to visit the given card parameter.
*
* @param card as a HiddenCard object.
*/
void visit(HiddenCard card);
}