added determine winner method to make move method smaller