Aloha and related algorithms simulation in Java