Java implementation of Lines-of-Action