mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 04:56:15 +01:00
improve position calc
This commit is contained in:
parent
01c351e64b
commit
1438ae5e4f
@ -133,7 +133,7 @@ public class TestWorld implements GameEventListener{
|
|||||||
@Override
|
@Override
|
||||||
public void receivedEvent(PopUpEvent event) {
|
public void receivedEvent(PopUpEvent event) {
|
||||||
if(event.msg().equals("Buy")) {
|
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);
|
Object fieldObject = app.getGameLogic().getBoardManager().getFieldAtIndex(field);
|
||||||
|
|
||||||
if (fieldObject instanceof BuildingProperty) {
|
if (fieldObject instanceof BuildingProperty) {
|
||||||
|
Loading…
Reference in New Issue
Block a user