Implemented method for determining the winner