From 7c00cd474b76cb4c741fe7f21e5cf8ef92b79591 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 7 Dec 2021 15:13:27 +0100 Subject: [PATCH] Add System.in as standard input --- client/build.gradle | 4 ++++ client/src/main/java/fr/lnl/game/client/view/ViewManager.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/build.gradle b/client/build.gradle index 41b271d..bfc0abb 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -29,3 +29,7 @@ application { // Define the main class for the application. mainClassName = 'fr.lnl.game.client.App' } + +run { + standardInput = System.in +} diff --git a/client/src/main/java/fr/lnl/game/client/view/ViewManager.java b/client/src/main/java/fr/lnl/game/client/view/ViewManager.java index de0f468..eac0fdf 100644 --- a/client/src/main/java/fr/lnl/game/client/view/ViewManager.java +++ b/client/src/main/java/fr/lnl/game/client/view/ViewManager.java @@ -31,7 +31,7 @@ public class ViewManager { Player player = game.getCurrentPlayer(); players.get(game.getCurrentPlayer()).getView().show(); game.play(); - System.out.println("Le joueur ordinateur numéro" + player.getId() + " a joué"); + System.out.println("Le joueur ordinateur numéro " + player.getId() + " a joué"); System.out.println("Il a joué l'action: " + game.getSelectedAction()); } }