Merge remote-tracking branch 'origin/gui' into gui

This commit is contained in:
Yvonne Schmidt 2024-12-02 05:25:24 +01:00
commit 7f58558da4

View File

@ -208,7 +208,9 @@ public class ServerGameLogic implements ClientInterpreter {
} }
if (player != null) { if (player != null) {
player.setName(msg.getName()); String name = msg.getName();
String truc = name.length() > 15 ? name.substring(0, 15) : name;
player.setName(truc);
player.setFigure(new Figure(1, -10, -10, Rotation.LEFT, msg.getFigure())); player.setFigure(new Figure(1, -10, -10, Rotation.LEFT, msg.getFigure()));
//TODO add figure to the map //TODO add figure to the map
playerHandler.setPlayerReady(player, true); playerHandler.setPlayerReady(player, true);