fill in the loop to check for valid plays pls