Modified code to display proper game board and error messages.