Added function to log the game grid