renamed some methods to make the meaning clearer. Simplified isGameOver