From f3deb95784b1105edc55860f109d9525006bcadd Mon Sep 17 00:00:00 2001 From: fdai7736 Date: Thu, 8 Feb 2024 12:22:19 +0100 Subject: [PATCH] refactoring: add names to player pane --- .../java/de/hsfulda/onses/controllers/PlayerController.java | 2 +- src/main/java/de/hsfulda/onses/services/PlayerService.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/hsfulda/onses/controllers/PlayerController.java b/src/main/java/de/hsfulda/onses/controllers/PlayerController.java index 5a11d1c..0779359 100644 --- a/src/main/java/de/hsfulda/onses/controllers/PlayerController.java +++ b/src/main/java/de/hsfulda/onses/controllers/PlayerController.java @@ -40,7 +40,7 @@ public class PlayerController implements Controller { } }); - playerNameLabel.setText("Test"); + playerNameLabel.setText(player.getPlayerName()); return parent; } diff --git a/src/main/java/de/hsfulda/onses/services/PlayerService.java b/src/main/java/de/hsfulda/onses/services/PlayerService.java index 8b96412..94b24cc 100644 --- a/src/main/java/de/hsfulda/onses/services/PlayerService.java +++ b/src/main/java/de/hsfulda/onses/services/PlayerService.java @@ -46,8 +46,8 @@ public class PlayerService { } public PlayerService() { - addPlayerToList(new Player().setPlayerService(this)); - addPlayerToList(new Player().setPlayerService(this)); + addPlayerToList(new Player().setPlayerService(this).setPlayerName("Player")); + addPlayerToList(new Player().setPlayerService(this).setPlayerName("Bot")); } public void removeCardFromPlayerDeck(Card card) {