From 0d8d0a68f2f793a3fb4ed685ca59761a9bcf9652 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Tue, 2 Feb 2021 15:46:38 +0100 Subject: [PATCH] Added main --- .gitignore | 1 + src/lsystem/Main.java | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .gitignore create mode 100644 src/lsystem/Main.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/src/lsystem/Main.java b/src/lsystem/Main.java new file mode 100644 index 0000000..9130184 --- /dev/null +++ b/src/lsystem/Main.java @@ -0,0 +1,20 @@ +package lsystem; + +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.println("Axiom: "); + String axiom = scanner.next(); + System.out.println("Règles (laissez vide quand vous avez fini): "); + List rules = new ArrayList<>(); + while(rules.isEmpty() || !rules.get(rules.size() - 1).equals("")) { + rules.add(scanner.next()); + } + } + +}