fix logic of deciding if a players wins