Added a method to check if game is over.

Added a method in GamLogic to check if the game is over.