logic to check winner horiz and vertically added on server