This commit is contained in:
Johannes Schmelz
2024-12-09 13:55:04 +01:00
parent e337303408
commit e98e17f6d7
11 changed files with 23 additions and 34 deletions

View File

@@ -253,7 +253,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
@Override
public void received(PlayerStatusUpdate msg) {
playerHandler = msg.getPlayerHandler();
System.out.println("Update Player");
LOGGER.log(Level.TRACE, "Update Player View triggerd with message: {0}", msg);
notifyListeners(new UpdatePlayerView());
}
@@ -317,7 +317,6 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
@Override
public void received(BuildInfo msg) {
System.out.println("TRIGGER BUILD INFO");
if (msg.isAdded()) {
BuildingProperty property = ((BuildingProperty)boardManager.getFieldAtIndex(msg.getId()));
if (property.getHotel() == 1 ) {

View File

@@ -168,7 +168,6 @@ public class ServerGameLogic implements ClientInterpreter {
PropertyField property = (PropertyField) boardManager.getFieldAtIndex(player.getFieldID()); // Assuming player position for property
player.buyProperty(property);
System.out.println("Properties:" +player.getProperties().toString());
LOGGER.log(Level.INFO, "Player {0} bought property {1}", player.getName(), property.getName());
}
updateAllPlayers();

View File

@@ -150,7 +150,7 @@ public class Figure implements Item{
float zOffset = new Random().nextFloat();
//TODO adjust y pos
return new Vector3f(baseX , 1, baseZ );
return new Vector3f(baseX , 0, baseZ );
}
public int getCurrentFieldID() {
@@ -158,7 +158,6 @@ public class Figure implements Item{
for (int fieldID = 0; fieldID < 40; fieldID++) {
Vector3f fieldPosition = calculateFieldPosition(fieldID);
if (pos.distance(fieldPosition) < 0.1f) { // Toleranz für Positionsvergleich
System.out.println("Current field ID: " + fieldID);
return fieldID;
}
}

View File

@@ -801,8 +801,6 @@ public class ServerGameLogicTest {
player.buyProperty(property);
System.out.println("Player Balance: " + player.getAccountBalance());
System.out.println("Player Properties: " + player.getProperties());
assertEquals(14000, player.getAccountBalance());
assertTrue(player.getProperties().contains(property.getId()));
}