Small game in python and Java