improve position calc

This commit is contained in:
Johannes Schmelz 2024-11-29 06:26:09 +01:00
parent 01c351e64b
commit 1438ae5e4f

View File

@ -133,7 +133,7 @@ public class TestWorld implements GameEventListener{
@Override
public void receivedEvent(PopUpEvent event) {
if(event.msg().equals("Buy")) {
int field = app.getGameLogic().getPlayerHandler().getPlayers().get(0).getFieldID();
int field = app.getGameLogic().getPlayerHandler().getPlayerById(app.getId()).getFieldID();
Object fieldObject = app.getGameLogic().getBoardManager().getFieldAtIndex(field);
if (fieldObject instanceof BuildingProperty) {