0
Arrays use
how can I use arrays in a storytelling game?
1 Resposta
0
Create an array containing paragraphs of the story
Then use a loop printing each story with the help of thread.sleep method
var stories = {/*an array containing stories*/}
for(var story:stories) {
System.out.println(story);
Thread.sleep(1000);
}
According to my memory sleep method will throw an InterruptedException. So make sure to catch it