From 7d2c85f617f96990792f183b38150f103b4d6e4b Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sun, 24 Nov 2024 00:13:32 +0100 Subject: [PATCH] fixed card bug --- .../model/src/main/java/pp/monopoly/model/card/Card.java | 4 ++-- .../src/main/java/pp/monopoly/model/fields/EventField.java | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java index 4eba570..8a25f5e 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java @@ -11,8 +11,8 @@ public class Card { this.keyword = keyword; } - public void accept(DeckHelper visitor) { - visitor.visit(this); + public void accept(DeckHelper visitor, Player player) { + visitor.visit(this, player); } String getDescription() { diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java index fc2ca57..cad2dde 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java @@ -2,8 +2,6 @@ package pp.monopoly.model.fields; import pp.monopoly.game.server.Player; -import pp.monopoly.model.card.Card; -import pp.monopoly.model.card.DeckHelper; public class EventField extends Field{ @@ -15,9 +13,4 @@ public class EventField extends Field{ public void accept(Player player) { player.visit(this); } - - public Card drawCard() { - return DeckHelper.drawCard(); - } - }