summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2016-12-10 09:45:42 +0100
committerJoffrey BION <joffrey.bion@gmail.com>2016-12-10 09:46:19 +0100
commitd9f78f8ee3b07871ee0f6868eb30e935e112afd8 (patch)
tree396749fb4e4caa27eef03934ea7b346166da317f /src/main/java
parentAdd MilitaryReinforcement effect (diff)
downloadseven-wonders-d9f78f8ee3b07871ee0f6868eb30e935e112afd8.tar.gz
seven-wonders-d9f78f8ee3b07871ee0f6868eb30e935e112afd8.tar.bz2
seven-wonders-d9f78f8ee3b07871ee0f6868eb30e935e112afd8.zip
Make Effect an interface instead of abstract class
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java2
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/Effect.java6
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/EndGameEffect.java3
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/InstantEffect.java3
4 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java b/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
index 51da55bb..f876328c 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
@@ -6,7 +6,7 @@ import org.luxons.sevenwonders.game.boards.Board;
import org.luxons.sevenwonders.game.RelativePlayerPosition;
import org.luxons.sevenwonders.game.cards.Color;
-public class BonusPerBoardElement extends Effect {
+public class BonusPerBoardElement implements Effect {
private List<RelativePlayerPosition> boards;
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/Effect.java b/src/main/java/org/luxons/sevenwonders/game/effects/Effect.java
index 86a6ae8c..b9634553 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/Effect.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/Effect.java
@@ -2,9 +2,9 @@ package org.luxons.sevenwonders.game.effects;
import org.luxons.sevenwonders.game.boards.Board;
-public abstract class Effect {
+public interface Effect {
- public abstract void apply(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard);
+ void apply(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard);
- public abstract int computePoints(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard);
+ int computePoints(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard);
}
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/EndGameEffect.java b/src/main/java/org/luxons/sevenwonders/game/effects/EndGameEffect.java
index e7a08e5c..ca8a1948 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/EndGameEffect.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/EndGameEffect.java
@@ -2,8 +2,9 @@ package org.luxons.sevenwonders.game.effects;
import org.luxons.sevenwonders.game.boards.Board;
-public abstract class EndGameEffect extends Effect {
+public abstract class EndGameEffect implements Effect {
+ @Override
public void apply(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard) {
}
}
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/InstantEffect.java b/src/main/java/org/luxons/sevenwonders/game/effects/InstantEffect.java
index 9f2e09ff..c3e5455e 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/InstantEffect.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/InstantEffect.java
@@ -2,8 +2,9 @@ package org.luxons.sevenwonders.game.effects;
import org.luxons.sevenwonders.game.boards.Board;
-public abstract class InstantEffect extends Effect {
+public abstract class InstantEffect implements Effect {
+ @Override
public int computePoints(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard) {
return 0;
}
bgstack15