Implemented a Method for winner detection.