added Visitors

This commit is contained in:
Johannes Schmelz 2024-11-12 22:33:10 +01:00
parent 25305760c5
commit dca23151a8
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package pp.monopoly.model;
import pp.monopoly.model.card.Card;
public interface CardVisitor<T> {
T visit(Card c);
}

View File

@ -0,0 +1,21 @@
package pp.monopoly.model;
import pp.monopoly.model.fields.BuildingProperty;
import pp.monopoly.model.fields.EventField;
import pp.monopoly.model.fields.FoodField;
import pp.monopoly.model.fields.GateField;
import pp.monopoly.model.fields.GoField;
import pp.monopoly.model.fields.GulagField;
import pp.monopoly.model.fields.TestStreckeField;
import pp.monopoly.model.fields.WacheField;
public interface FieldVisitor<T> {
T visit(BuildingProperty field);
T visit(FoodField field);
T visit(GateField field);
T visit(GulagField field);
T visit(TestStreckeField field);
T visit(EventField field);
T visit(WacheField field);
T visit(GoField field);
}