Skip to content

Instantly share code, notes, and snippets.

@shalk shalk/Coin.java
Last active Mar 25, 2019

Embed
What would you like to do?
Coin4j
import java.util.Random;
import java.util.concurrent.TimeUnit;
public class Coin {
public static void main(String[] args) throws InterruptedException {
String[] candidates = new String[]{"๐ŸŒ", "๐ŸŒ–", "๐ŸŒ—", "๐ŸŒ˜", "๐ŸŒš", "๐ŸŒ’", "๐ŸŒ“", "๐ŸŒ”"};
Random r = new Random();
for (int i = 0; i < 3; i++) {
for (String s : candidates) {
System.out.print(s);
TimeUnit.MILLISECONDS.sleep(42);
System.out.print("\b\b");
}
}
System.out.println(r.nextBoolean() ? "๐ŸŒ" : "๐ŸŒš");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You canโ€™t perform that action at this time.