End of game logic

Added logic for the end of game. Added HTML page to view an ended game.