Refactored how game checks for wins and ties