put pieces alternately
check whether the step is valid