fixing tied and winning game condition