Added main

This commit is contained in:
Quentin Legot 2021-02-02 15:46:38 +01:00
parent 8f7f3cf280
commit 0d8d0a68f2
2 changed files with 21 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

20
src/lsystem/Main.java Normal file
View File

@ -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<String> rules = new ArrayList<>();
while(rules.isEmpty() || !rules.get(rules.size() - 1).equals("")) {
rules.add(scanner.next());
}
}
}