basic grid game in Python