From 69a62c5c4b6c42fe54285909364570219a477891 Mon Sep 17 00:00:00 2001 From: Stefan Waldmann Date: Fri, 28 Jan 2022 08:01:21 +0100 Subject: [PATCH] Prompt for ENTER to continue --- 55_Life/java/src/java/Life.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/55_Life/java/src/java/Life.java b/55_Life/java/src/java/Life.java index 55f55ee8..0e202240 100644 --- a/55_Life/java/src/java/Life.java +++ b/55_Life/java/src/java/Life.java @@ -48,6 +48,7 @@ public class Life { printGeneration(); advanceToNextGeneration(); if (stopAfterGen) { + System.out.print("PRESS ENTER TO CONTINUE"); consoleReader.nextLine(); } } @@ -163,7 +164,8 @@ public class Life { /** * Main method that starts the program. * - * @param args the command line arguments. + * @param args the command line arguments: + *
-s: Stop after each generation (press enter to continue)
* @throws Exception if something goes wrong. */ public static void main(String[] args) throws Exception {