Show the valid positions of a piece and fixed a bug