simple train simulation in Java 8