From 99da9715c5c7321fc99835b62aad83acbb816972 Mon Sep 17 00:00:00 2001 From: Speedy Gonzalez Date: Tue, 7 Dec 2021 14:33:56 +0100 Subject: [PATCH] Updated buildCity method. --- src/ch/zhaw/catan/SiedlerGame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/zhaw/catan/SiedlerGame.java b/src/ch/zhaw/catan/SiedlerGame.java index 9f5c04f..6f488ad 100644 --- a/src/ch/zhaw/catan/SiedlerGame.java +++ b/src/ch/zhaw/catan/SiedlerGame.java @@ -315,8 +315,8 @@ public class SiedlerGame { return false; } //2. Check if Settlement has already been built - Settlement atCurrentPosition = board.getCorner(position); //todo prüfen ob Siedlung von richtiger Faction und nicht Stadt - if (atCurrentPosition == null || atCurrentPosition.getFaction() != allPlayers.get(activePlayer).getFaction()){ + Settlement atCurrentPosition = board.getCorner(position); + if (atCurrentPosition == null || atCurrentPosition instanceof City || atCurrentPosition.getFaction() != allPlayers.get(activePlayer).getFaction()){ return false; } //3. Can player build a City.