mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 21:39:44 +01:00
createBoard method
This commit is contained in:
parent
f7149f225c
commit
44673fd57e
@ -2,6 +2,7 @@ package pp.monopoly.model;
|
||||
|
||||
import pp.monopoly.model.fields.BuildingProperty;
|
||||
import pp.monopoly.model.fields.EventField;
|
||||
import pp.monopoly.model.fields.FineField;
|
||||
import pp.monopoly.model.fields.FoodField;
|
||||
import pp.monopoly.model.fields.GateField;
|
||||
import pp.monopoly.model.fields.GoField;
|
||||
@ -18,4 +19,5 @@ public interface FieldVisitor<T> {
|
||||
T visit(EventField field);
|
||||
T visit(WacheField field);
|
||||
T visit(GoField field);
|
||||
T visit(FineField field);
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import pp.monopoly.model.card.DeckHelper;
|
||||
|
||||
public class EventField extends Field{
|
||||
|
||||
public EventField(int id) {
|
||||
super("EreignissFeld", id);
|
||||
public EventField(String name, int id) {
|
||||
super(name, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,54 @@
|
||||
package pp.monopoly.model.fields;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FieldFactory {
|
||||
|
||||
public static List<Field> createBoard() {
|
||||
ArrayList<Field> fields = new ArrayList<>();
|
||||
|
||||
fields.addLast(new GoField());
|
||||
fields.addLast(new BuildingProperty("Gym", 1, 600, 20));
|
||||
fields.addLast(new EventField("Hausfeier", 2));
|
||||
fields.addLast(new BuildingProperty("Sportplatz", 3, 600, 40));
|
||||
fields.addLast(new FineField("Diszi", 4));
|
||||
fields.addLast(new GateField("Südtor", 5));
|
||||
fields.addLast(new BuildingProperty("Studium+", 6, 1000, 60));
|
||||
fields.addLast(new EventField("Üvas", 7));
|
||||
fields.addLast(new BuildingProperty("PhysikHörsaal", 8, 1000, 60));
|
||||
fields.addLast(new BuildingProperty("Audimax", 9, 1200, 80));
|
||||
fields.addLast(new GulagField());
|
||||
fields.addLast(new BuildingProperty("99er", 11, 1400, 100));
|
||||
fields.addLast(new FoodField("Brandl", 12));
|
||||
fields.addLast(new BuildingProperty("12er", 13, 1400, 100));
|
||||
fields.addLast(new BuildingProperty("23er", 14, 1600, 120));
|
||||
fields.addLast(new GateField("HauptWache", 15));
|
||||
fields.addLast(new BuildingProperty("Schwimmhalle", 16, 1800, 140));
|
||||
fields.addLast(new BuildingProperty("CISM-Bahn", 17, 1800, 140));
|
||||
fields.addLast(new EventField("Marine-Welcome-Party", 18));
|
||||
fields.addLast(new BuildingProperty("Kletterturm", 19, 2000, 160));
|
||||
fields.addLast(new TestStreckeField());
|
||||
fields.addLast(new BuildingProperty("StudFBer C", 21, 2200, 180));
|
||||
fields.addLast(new EventField("Üvas", 22));
|
||||
fields.addLast(new BuildingProperty("StudFBer B", 23, 2200, 180));
|
||||
fields.addLast(new BuildingProperty("StudFBer A", 24, 2400, 200));
|
||||
fields.addLast(new GateField("Nordtor", 25));
|
||||
fields.addLast(new BuildingProperty("Cascada", 26, 2600, 220));
|
||||
fields.addLast(new BuildingProperty("Fakultätsgebäude", 27, 2600, 220));
|
||||
fields.addLast(new FoodField("Truppenküche", 28));
|
||||
fields.addLast(new BuildingProperty("Prüfungsamt", 29, 2800, 240));
|
||||
fields.addLast(new WacheField());
|
||||
fields.addLast(new BuildingProperty("Feuerwehr", 31, 3000, 260));
|
||||
fields.addLast(new BuildingProperty("SanZ", 32, 300, 260));
|
||||
fields.addLast(new EventField("Maibock", 33));
|
||||
fields.addLast(new BuildingProperty("Rechenzentrum", 34, 3200, 280));
|
||||
fields.addLast(new GateField("Osttor", 35));
|
||||
fields.addLast(new EventField("Üvas", 36));
|
||||
fields.addLast(new BuildingProperty("2er", 37, 3500, 350));
|
||||
fields.addLast(new FineField("EZM", 38));
|
||||
fields.addLast(new BuildingProperty("20er", 39, 4000, 500));
|
||||
|
||||
return fields;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package pp.monopoly.model.fields;
|
||||
|
||||
import pp.monopoly.game.server.Player;
|
||||
|
||||
public class FineField extends Field{
|
||||
|
||||
FineField(String name, int id) {
|
||||
super(name, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(Player player) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'accept'");
|
||||
}
|
||||
|
||||
}
|
@ -22,4 +22,7 @@ public abstract class PropertyField extends Field {
|
||||
return price;
|
||||
}
|
||||
|
||||
public int getHypo() {
|
||||
return price/2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user