Java algorithm animation project