A river crossing game in Java