Game. Port to java from python